Hi Alexander -
I have tried the SQL you suggested, but the performance got worse, I do not
know why?
1. "update t_device_module set isOnline=1, mqttTime=" +
System.currentTimeMillis() / 1000 + " where devId in ('0001', '0002', ...,
'2048')";
The SQL may take 600ms for 2048 records.
2."update t_device_module t1 set t1.isOnline=1, t1.mqttTime=" +
System.currentTimeMillis() / 1000 + " where t1.devId in (select table.devId
from table(devId varchar = ?))";
cache.query(new SqlFieldsQuery(sql2).setArgs(new
Object[]{clientIds.toArray()}));
The clientIds is a list which contains 2048 records(equals with above), but
it was executed about 2000ms.
According to the introduction of
sql-performance-and-usability-considerations
<https://apacheignite-sql.readme.io/docs/performance-and-debugging#sql-performance-and-usability-considerations>
: the second SQL is recommended, bucause the first one will not use indexes.
My question is why the second one is worse than the first one.
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/