|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Today @ 8:52 AM
Points: 1,788,
Visits: 3,327
|
|
Brian, I'm have to apologize to you because for some reason my eyes and brain didn't see that you kept the ORDER BY clause. For some reason I thought that the article explained a way to get rid of the ORDER BY, but when I read it again I don't know where that idea came from 
Again, I'm sorry. Its a good article !
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Friday, April 26, 2013 2:31 AM
Points: 228,
Visits: 495
|
|
Jason Lees-299789 (9/15/2010) Like Nils, I dont quite understand the reason for the article, in 95% of cases the sort operation is the least of your worries in a plan, especially when you've joined 2 or 3 tables together to bring back an amalgamaged dataset, such as Stock levels by product, and unfilled orders.
I'm not a fan of the Non-clustered Index with all other columns in an Include, one or two columns that are commonly associated with the business key, eg Indexed on ProductNumber, with the ProductName and ProductCode as include columns is reasonable.
Thanks for your feedback!
I would put my worries when studying a plan where I have the biggest cost, which in this case I wanted it to be the sort operator, and that's why I didn't use a complicated SELECT statement. Yes, I agree, if the SORT operator is only a fraction of the total query cost I would not bother with improving it!
Regards Brian Ellul ---------------------------------------------------------------------------------- Computers are incredibly fast, accurate, and stupid. Human beings are incredibly slow, inaccurate, and brilliant. Together they are powerful beyond imagination. - Albert Einstein -
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Friday, April 26, 2013 2:31 AM
Points: 228,
Visits: 495
|
|
Nils Gustav Stråbø (9/15/2010)
Brian, I'm have to apologize to you because for some reason my eyes and brain didn't see that you kept the ORDER BY clause. For some reason I thought that the article explained a way to get rid of the ORDER BY, but when I read it again I don't know where that idea came from  Again, I'm sorry. Its a good article !
No problem and welcome
Regards Brian Ellul ---------------------------------------------------------------------------------- Computers are incredibly fast, accurate, and stupid. Human beings are incredibly slow, inaccurate, and brilliant. Together they are powerful beyond imagination. - Albert Einstein -
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Thursday, November 04, 2010 9:41 AM
Points: 461,
Visits: 229
|
|
It's always refreshing to read clear, consise articles that get your grey matter spinning, even though they might not apply to you directly.
Nice job Brian!
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Thursday, May 02, 2013 9:10 PM
Points: 26,
Visits: 263
|
|
Thank you for taking the time and effort to submit this article. I always appreciate reading about how to optimize queries and actually being able to understand what the writer is trying to convey. I also appreciate the other feedback as a reality check!
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Yesterday @ 8:15 PM
Points: 1,409,
Visits: 4,509
|
|
there were a few times i changed the sort order of indexes to make things a bit faster. when you can't spend $6000 on extra storage because all the internal hard drive bays are full but you need to optimize I/O performance you look at every little thing.
i'm waiting for the SSD server drives to get cheaper to try them out by putting tempdb on them
https://plus.google.com/100125998302068852885/posts?hl=en http://twitter.com/alent1234 x-box live gamertag: i am null [url=http://live.xbox.com/en-US/MyXbox/Profile[/url]
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Thursday, December 20, 2012 1:03 PM
Points: 265,
Visits: 589
|
|
alen teplitsky (9/15/2010) there were a few times i changed the sort order of indexes to make things a bit faster. when you can't spend $6000 on extra storage because all the internal hard drive bays are full but you need to optimize I/O performance you look at every little thing.
i'm waiting for the SSD server drives to get cheaper to try them out by putting tempdb on them
After playing with SSDs for tempdb, I've concluded it's best to make all drives SSDs to get the max bang for the migration. Just tempDB seems to be an awfully small improvement for the level of disruption on the main box. On the other hand, for external raids and such, SSDs can be slowly implemented as prices come down.
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Yesterday @ 8:15 PM
Points: 1,409,
Visits: 4,509
|
|
the enterprise SSD's are something like $7000 for 200GB or so. forgot the exact numbers from the HP branded ones. a 146GB hard drive is less than $300. for the data i can buy up a lot of hard drives to spit the IO up. the new Proliant G7's support up to 16 hard drives in a 2U server
https://plus.google.com/100125998302068852885/posts?hl=en http://twitter.com/alent1234 x-box live gamertag: i am null [url=http://live.xbox.com/en-US/MyXbox/Profile[/url]
|
|
|
|
|
SSCoach
         
Group: General Forum Members
Last Login: Monday, May 20, 2013 1:07 PM
Points: 18,733,
Visits: 12,332
|
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Monday, May 06, 2013 8:44 AM
Points: 90,
Visits: 129
|
|
A more efficient and clean way to do it is on client side
Bouarroudj Mohamed www.sqldbtools.com
|
|
|
|