Topic
  • 2 replies
  • Latest Post - ‏2013-09-25T06:48:21Z by FPLAZAVI
FPLAZAVI
FPLAZAVI
14 Posts

Pinned topic SQL PLAN CACHE

‏2013-09-24T14:51:10Z |

I have a question ... when i make a Plan Cache Snapshot I found diferent entries with the same statement (the job number, time, etc ... is different)

This is normal?

I was thinking that only I had to be one ...

Thanks ...

  • krmilligan
    krmilligan
    450 Posts

    Re: SQL PLAN CACHE

    ‏2013-09-24T15:46:22Z  

    Plan Cache can store up to 3 access plans per SQL statement.  For example, the SQL statement may be run during the day and at night.  At night, the SQL statement might run in a pool with more memory resulting in the optimizer using a different plan for that environment.  That would be the normal case, I think there are also weird timing windows where 2 jobs run an SQL statement for the first time at the exact same time. 

  • FPLAZAVI
    FPLAZAVI
    14 Posts

    Re: SQL PLAN CACHE

    ‏2013-09-25T06:48:21Z  

    Plan Cache can store up to 3 access plans per SQL statement.  For example, the SQL statement may be run during the day and at night.  At night, the SQL statement might run in a pool with more memory resulting in the optimizer using a different plan for that environment.  That would be the normal case, I think there are also weird timing windows where 2 jobs run an SQL statement for the first time at the exact same time. 

    Thanks for the reply ...

    I have the same statement with 30 min of difference ... ( same kind of job -qzdasonit ..., same user ...)

    I will investigate ...

     

    Fernando