Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Will RESULT_CACHE keyword return updated data from function in Oracle?

I am calling function inside select query of view. View is reading records from table which contains around 1 million records. When I am writing RESULT_CACHE key word in function, I am getting output in fraction of seconds. I have doubt that when value of any column is changed which is used inside view, will function consider that new value?

like image 213
devendrant Avatar asked Sep 11 '15 08:09

devendrant


1 Answers

As per my knowledge RESULT_CACHE will provide you the data from oracle special in-memory result cache.

if you want to get updated result you can use, RESULT_CACHE RELIES_ON (TABLE NAME).

But if your DB version is 11.2 or higher then RELIES ON clause is unnecessary as it automatically tracks dependencies and invalidates the cached results when necessary.

you can refer from here or here in details

like image 149
chetan Avatar answered Sep 21 '22 02:09

chetan