Query caching problem — oracle-tech

    Forum Stats

  • 3,707,910 Users
  • 2,240,909 Discussions
  • 7,839,920 Comments

Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Query caching problem

KhalilKhalil Posts: 10 Blue Ribbon
edited January 7 in Coherence Support

I'm using Oracle database 19c. A query in a package returns 4 records. I added a 5th record to the table but the query still returns 4 records. I had to add a condition (and 1=1) to get the correct results so I guess it is a caching problem. I'm not using result_cache and the result_cache_mode is set to manual. Any idea how to solve this serious problem?

Tagged:

Answers

  • KhalilKhalil Posts: 10 Blue Ribbon

    The two queries have different execution plans.:

    • The correct one (with 1=1) uses a full table scan.
    • The other one uses Or-Expansion

    So maybe this is an optimizer issue.

Sign In or Register to comment.