Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9159251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:26:48+00:00 2026-06-17T13:26:48+00:00

I am using Oracle 10G and Oracle SQL developer ver 3. I wanted to

  • 0

I am using Oracle 10G and Oracle SQL developer ver 3. I wanted to know if Oracle stores/caches the result of a query somewhere so that next you execute the same query with the same parameters the time it would take to retrieve the data is lesser than the first time you execute the script.

If it does for how long does it cache those results?

I was trying to execute a select SQL script and after repeating it 3x, the time it takes for it to retrieve the data and display is reduced by almost half. But some other times if I execute the same script on another database it doesn’t appear to make any change even if I repeat it several times.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T13:26:49+00:00Added an answer on June 17, 2026 at 1:26 pm

    Oracle caches SQL statements in the library cache. When you execute a statement multiple times (whether or not the same bind variable values are used), Oracle uses the data in the library cache to avoid having to re-parse the SQL statement and generate a new query plan. When you are looking at tuning an individual query, however, it is very unlikely that this caching is meaningfully affecting performance. Parsing a SQL statement and generating the query plan is generally a very quick process.

    Oracle also caches data blocks in the buffer cache. So when you execute the query and read a particular block of data in order to get the data for a particular row in the table, that block will be cached. That frequently allows subsequent executions of the same SQL statement with the same set of bind variables to do many fewer physical reads since many more of the blocks that the query needs to read are cached. In general, these blocks are stored in a LRU (least recently used) cache so they will be cached until it ages out because other blocks are more popular (there are exceptions that make the buffer cache something other than a pure LRU cache– blocks that are read via full table scans are generally put a the end of the cache rather than at the beginning, for example– but it’s generally reasonable to think of it as a LRU cache).

    Then you have all the caches outside of Oracle. For example, your operating system will often be configured to cache portions of files that are read so even if a block ages out of Oracle’s buffer cache, it may be in the file system cache which would still be much faster than reading the block from disk. Most SANs will also cache recently used data which would allow that data to be retrieved without needing to read it from disk. Generally, it is more efficient if the data is cached in Oracle but it is still much more efficient to retrieve a block from the file system cache or from the SAN cache rather than reading it from a physical drive.

    Running a query multiple times in succession will generally get faster because you are forcing more of the blocks you are interested in to be cached somewhere and substantially reducing the amount of physical I/O the system needs to do. Of course, if your queries are not I/O bound or if your queries are against data that is already cached, the difference will be much smaller. It is entirely possible, though, that the same query would benefit substantially from being run multiple times one day and not at all the next day because one day none of the blocks it is interested in were already cached and other sessions and another day all the blocks it is interested in were already cached.

    In 11g, you have the option of configuring a result cache that would allow you to cache the results of particular queries not just the blocks that are read in order to produce those results.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Allround Automation PL/SQL Developer with Oracle 10g, and today I've noticed that
I'm using SQL*Plus 9.2 on Oracle 10g enterprise. I have created some scripts that
when using oracle forms to generate md5 hash, i get result that is different
Possible Duplicate: ‘CONTINUE’ keyword in Oracle 10g PL/SQL I am Using Oracle 9i and
I am using Oracle 10g database and trying to run a procedure using SQL
I've inherited a working Oracle (10g) to SQL Server 2005 data replication using standard
I am using Oracle 10g, and I have a view that joins two large
I've been connecting to an oracle 10g server using ms sql servers linked server
I am querying an Oracle 10g database using OleDb. My query is very simple,
I am using Oracle 10 g and PL/SQL Developer for the development. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.