Cpaulyz commented on PR #11226:
URL: https://github.com/apache/iotdb/pull/11226#issuecomment-1736948870
There are some experiment results for this optimization. The workload is
designed as below:
```java
session.executeNonQueryStatement("select ** from root.db");
long timeCost = 0;
for (int i = 0; i < 1000; i++) {
session.deleteData(Collections.singletonList("root.db.d1.s1"),
0, Long.MAX_VALUE);
long startTime = System.currentTimeMillis();
session.executeQueryStatement("select
s0,s1,s2,s3,s4,s5,s6,s7,s8,s9 from root.db.d2");
timeCost += System.currentTimeMillis() - startTime;
}
System.out.println(timeCost);
```
Originally all metadata caches were cleared when deleting data. Therefore,
it needs fetchSchema and put into cache for every query statement.
In the new implementation, deleting data only evict the exact cache enrty.
In this example, only root.db.d1.s1 will be evicted, so queries about
root.db.d2.* will hit the cache every time.
profile before optimization:
<img width="1182" alt="image"
src="https://github.com/apache/iotdb/assets/43774645/3d481784-02dd-42d6-b4c4-c2ced63d5711">
profile after optimization:
<img width="1180" alt="image"
src="https://github.com/apache/iotdb/assets/43774645/2b17f595-46f8-49ff-a760-2008916a890b">
In this example, optimised 10-20% of the time cost.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]