SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Query slower on 2008 than 2000


Query slower on 2008 than 2000

Author
Message
Jake Shelton
Jake Shelton
SSC Veteran
SSC Veteran (283 reputation)SSC Veteran (283 reputation)SSC Veteran (283 reputation)SSC Veteran (283 reputation)SSC Veteran (283 reputation)SSC Veteran (283 reputation)SSC Veteran (283 reputation)SSC Veteran (283 reputation)

Group: General Forum Members
Points: 283 Visits: 916
Hi all,

I've restored a SS2K DB to SS2K8, new box with superior (virtual) hardware, however one of our views is running much more slowly.

On the old box it runs in 2 minutes, yet takes in excess of 20 on the new environment.

Rebuilt the indices and updated the stats on both DB's referenced in the view. Compatibility Level for both = 100.

Execution plan, Costliest Items (Old box)

61% Sort (Order By)
21% Table Scan (Where date greater than...Or 'Period' greater than...)
3% (x3) (Clustered Index scans)

Execution plan Costliest Items (New box)

53% Table Scan (Select from 2 DB's with implicit conversions not occurring on old box)
11% Table spool (Lazy)
7% (x3) Clustered Index scans


Thanks in advance for your help,

Jake
SQLRNNR
SQLRNNR
SSC-Dedicated
SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)

Group: General Forum Members
Points: 32098 Visits: 18551
With the improvements in the QO, the implicit conversions are likely just being revealed to you now while they 2000 didn't care so much about it. I'd find a way to resolve the implicit conversions.



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

Jake Shelton
Jake Shelton
SSC Veteran
SSC Veteran (283 reputation)SSC Veteran (283 reputation)SSC Veteran (283 reputation)SSC Veteran (283 reputation)SSC Veteran (283 reputation)SSC Veteran (283 reputation)SSC Veteran (283 reputation)SSC Veteran (283 reputation)

Group: General Forum Members
Points: 283 Visits: 916
SQLRNNR (3/10/2014)
With the improvements in the QO, the implicit conversions are likely just being revealed to you now while they 2000 didn't care so much about it. I'd find a way to resolve the implicit conversions.


QO??

Any good resources to help circumvent those conversions? I smell a major code rewrite...
SQLRNNR
SQLRNNR
SSC-Dedicated
SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)

Group: General Forum Members
Points: 32098 Visits: 18551
QO = query optimizer.

As for how to circumvent those implicit conversions - nothing comes to mind at the moment (without the code rewrite).



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search