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 6374649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:30:53+00:00 2026-05-25T01:30:53+00:00

In Oracle, SQL statements will be cached in shared_pool, and data which is selected

  • 0

In Oracle, SQL statements will be cached in shared_pool, and data which is selected frequently will be cached in db_cache.

What does PostgreSQL do? Will SQL statements and data be cached in shared_buffers?

  • 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-05-25T01:30:54+00:00Added an answer on May 25, 2026 at 1:30 am

    Generally, only the contents of table and index files will be cached in the shared buffer space.

    Query plans are cached in some circumstances. The best way to ensure this is to PREPARE the query once, then EXECUTE it each time.

    The results of a query are not automatically cached. If you rerun the same query — even if it’s letter-for-letter identical, and no updates have been performed on the DB — it will still execute the whole plan. It will, of course, make use of any table/index data that’s already in the shared buffers cache; so it will not necessarily have to read all the data from disk again.

    Update on plan caching

    Plan caching is generally done per session. This means only the connection that makes the plan can use the cached version. Other connections have to make and use their own cached versions. This isn’t really a performance issue because the saving you get from reusing a plan is almost always miniscule compared to the cost of connecting anyway. (Unless your queries are really complicated.)

    It does cache if you use PREPARE: http://www.postgresql.org/docs/current/static/sql-prepare.html

    It does cache when the query is in a PL/plSQL function: http://www.postgresql.org/docs/current/static/plpgsql-implementation.html#PLPGSQL-PLAN-CACHING

    It does not cache ad-hoc queries entered in psql.

    Hopefully someone else can elaborate on any other cases of query plan caching.

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

Sidebar

Related Questions

I need some help in creating an Oracle SQL which I will execute in
In Oracle SQL Developer, one can list the data in a table using the
I'm using Oracle SQL Developer to query an Oracle DB (not sure which version
I have to copy data from several tables from SQL Server to Oracle. The
While attempting to execute SQL insert statements using Oracle SQL Developer I keep generating
For my current project I need a SQL parser that parses Oracle SQL statements.
IS [NOT] NULL meddles with the indexes of SQL statements in Oracle, is there
I need to transform an Oracle SQL statement into a Stored Procedure therefore users
When I try to execute this statement in Oracle SQL Developer 2.1 a dialog
I have an big problem with an SQL Statement in Oracle. I want to

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.