Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Execution plan Expand / Collapse
Author
Message
Posted Monday, September 10, 2012 4:09 PM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Thursday, April 03, 2014 2:14 PM
Points: 746, Visits: 1,702
Hi All,

I have 2 sql sevr 2005 instances with same build no,same edition.

I restored the database from one insatnce to another instance. But when i execute the same query in the second instance , it poduces are different plan and my query performance is slow now on one instance.

Just wanted to understand how sql server or on what factors/basis sql servr produces are different plans if my stats are same ?

Thanks in Advance.



Post #1357043
Posted Monday, September 10, 2012 4:14 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 6:05 PM
Points: 22,530, Visits: 30,307
Oracle_91 (9/10/2012)
Hi All,

I have 2 sql sevr 2005 instances with same build no,same edition.

I restored the database from one insatnce to another instance. But when i execute the same query in the second instance , it poduces are different plan and my query performance is slow now on one instance.

Just wanted to understand how sql server or on what factors/basis sql servr produces are different plans if my stats are same ?

Thanks in Advance.





Are there any differences in how the instances are configured? Are the instances on the same server or different servers? If different servers, how are these servers configured?



Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #1357047
Posted Monday, September 10, 2012 10:02 PM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Thursday, April 03, 2014 2:14 PM
Points: 746, Visits: 1,702
Both are two different server with configuration. But on the second servers there are 2 instances.
One more thing, the second is not at all running on the second box.
Post #1357124
Posted Wednesday, September 12, 2012 6:34 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 7:59 AM
Points: 2,665, Visits: 3,634
Did you rebuild statistics?

I do believe that even though the servers may be configured the same/same hardware, when you restore a database the stats get "out of whack".


I may be wrong, and if I am someone will most likely point it out here.


______________________________________________________________________

Personal Motto: Why push the envelope when you can just open it?

If you follow the direction given HERE you'll likely increase the number and quality of responses you get to your question.

Jason L. Selburg
Post #1357939
Posted Wednesday, September 19, 2012 3:19 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Wednesday, April 16, 2014 9:25 AM
Points: 7,070, Visits: 12,523
Jason Selburg (9/12/2012)
Did you rebuild statistics?

I do believe that even though the servers may be configured the same/same hardware, when you restore a database the stats get "out of whack".


I may be wrong, and if I am someone will most likely point it out here.

A restore will not affect the statistics. A restore gives us an exact page-for-page database as existed when the database was backed up.


__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato

Believe you can and you're halfway there. --Theodore Roosevelt

Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein

The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein

1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
Post #1361651
Posted Wednesday, September 19, 2012 3:20 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Wednesday, April 16, 2014 9:25 AM
Points: 7,070, Visits: 12,523
Oracle_91 (9/10/2012)
Hi All,

I have 2 sql sevr 2005 instances with same build no,same edition.

I restored the database from one insatnce to another instance. But when i execute the same query in the second instance , it poduces are different plan and my query performance is slow now on one instance.

Just wanted to understand how sql server or on what factors/basis sql servr produces are different plans if my stats are same ?

Thanks in Advance.




If the optimizer chooses a parallel plan that could account for a difference. Can you please post both execution plans attached to this thread as .sqlplan files?


__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato

Believe you can and you're halfway there. --Theodore Roosevelt

Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein

The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein

1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
Post #1361653
Posted Thursday, October 11, 2012 1:46 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 6:52 AM
Points: 2,820, Visits: 3,917
there could be some hardware allocation differnce like memory or cpu OR sme diiferent setting like maxdop etc

-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done
Post #1371251
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse