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: Wednesday, July 23, 2014 1:13 PM
Points: 774, Visits: 1,734
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: Yesterday @ 7:12 PM
Points: 23,397, Visits: 32,241
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: Wednesday, July 23, 2014 1:13 PM
Points: 774, Visits: 1,734
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: Saturday, September 13, 2014 7:14 AM
Points: 2,717, Visits: 3,849
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: Monday, September 15, 2014 7:19 PM
Points: 7,127, Visits: 12,655
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
Post #1361651
Posted Wednesday, September 19, 2012 3:20 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Monday, September 15, 2014 7:19 PM
Points: 7,127, Visits: 12,655
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
Post #1361653
Posted Thursday, October 11, 2012 1:46 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Tuesday, August 19, 2014 12:26 AM
Points: 2,840, Visits: 3,963
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