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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T10:06:17+00:00 2026-06-01T10:06:17+00:00

Query plans are stored in the plan cache for both views and ordinary SQL

  • 0

Query plans are stored in the plan cache for both views and ordinary
SQL

from here

ok.

Once and for all : How does it help me ?

Even if I have the Query plans in the cache for a query : Once I run the query he WILL scan the whole table/s + aggregates+…. .

and if i run it tomorrow – It will scan the whole table/s + aggregates again ….

there’s can’t be a situation like this : ” AH !!! I have Data in cache , so Ill take it from there….…( because maybe the table has changed…)

so , where is the true benefit ?

I seems to be missing something.

thank you.

  • 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-01T10:06:18+00:00Added an answer on June 1, 2026 at 10:06 am

    Suppose we have a query such as

    SELECT *
    FROM 
        A 
        INNER JOIN B ON -- omitted
        INNER JOIN C ON -- omitted
        -- omitted
        INNER JOIN Q ON -- omitted
    

    with however many tables that is. Obviously, the order these joins are performed in will affect performance. Also, deciding the best order, given the table statistics, also takes an amount of time.

    By caching the query plan, we can pay the cost of deciding the best order just once – every subsequent time the query is run, we already know to first take K, join it to E, then to H, and so on.

    Of course, this means that a significant change in the data statistics invalidates our plan, but caching anything always involves a trade-off.


    A resource you may find useful for learning more about the hows and whys of query planning is SQL Coach – start with THE Analogy.

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

Sidebar

Related Questions

I'd like to be able to convert SQL Server query plans from XML to
Does anyone have a query which searches through SQL2005/2008's plan cache identifying queries or
I am writing some new SQL queries and want to check the query plans
I have the following query: select p from Plan as p where p.location =
We have a SQL Server DB with 150-200 stored procs, all of which produce
In Microsoft SQL Server how can I get a query execution plan for a
I'm having trouble understanding the behavior of the estimated query plans for my statement
If I do a query (I plan to use SDS.P) against the global catalog,
How do conditional statements (like IF ... ELSE ) affect the query execution plan
I'm looking to build a query that will use the non-clustered indexing plan on

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.