Question:
Hello,
I have a query cached in the main memory [checked it on the system] but when I run the same query the cached query is not being used. The optimizer is reading the database table as oppose to using the cached query.
I checked the RSRT to make sure the query is qualified to cache. And made sure there is no datachange since the caching of query.
In what situation the cached query does not get used?
Thanks,
Answer:
Are you using the amse or different set of Input Variable values for your second run vs the first cached version? They must match exactly, unless you have the variables marked as can not be changed during navigation.
Do you have multiple appl servers in your environement? Your second query needs to run on the same server where the first execution was cached, unless you have cross server caching on.
I'm assuming you have looked at the BW Statistics in RSRT to make your determination that the DB was hit rather than cache.