Specify compiler context when querying natable virtual table interface select * from table(natablecache('ALL','local')) ; select * from table(natablecacheentries('meta','local')) ; select * from table(naroutinecache('user','local')) ;
Following the querycache virtual table interface, now the natable and naroutine cache virtual table interfaces also support specifying the name of the context we want to query. The first parameter can be 'all' or name of context (e.g. 'meta', 'user', 'ustat'). The second parameter can be local or remote. Parameters are case insensitive. For remote compiler we only query the context pointed to by activeschemadb. The column num_entries has been added to natablecache virtual table. This change can be used to monitor memory growth in these caches.
Patch Set 2: Address issues found by Dave. Changes in 4 files sql/arkcmp/NATableSt.cpp sql/arkcmp/NATableSt.h sql/arkcmp/QueryCacheSt.cpp sql/optimizer/NARoutine.cpp
Changes cover A minor leak in in HQCIterator returning FALSE in NATable/RoutineCacheStats iterator getNext methods
Hybrid Query Cache feature implemented. The Hybrid Query Cache (HQC) is an enhancement of existing Query Cache, which is trying to find match queries in existing query cache at an earlier point, i.e. just after parser and before binder so as to avoid binder overhead if there's a hit. Two virutal table ISPs are added to show stats of Hybrid Query Cache. Add control of ISP to run locally or remotely. Changes after reviewers' comments. Fixup errors in SqlciErrors.txt that cause core/TEST014 failure. Fix minor issues about (hybrid)query cache ISP. Add HQC virtual table ISP tests to compGeneral/TEST042.