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

Does the query engine guarantee index order of numbers table in the join.. Expand / Collapse
Author
Message
Posted Tuesday, January 8, 2008 6:16 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, March 5, 2014 4:18 AM
Points: 5, Visits: 91

Does the query engine guarantee index order of numbers table in the join
with reference to the second example cited in your article.
discussion round the campfire is speculating that if the index isnt in numeric order then the application in the second example will fail with eroneous replacements within the string..

Does anyone have any deeper knowledge to dispell this concern ?

Many Thanks

Curious SQL People....
Post #440369
Posted Wednesday, December 30, 2009 12:05 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 10:05 AM
Points: 35,529, Visits: 32,112
Not sure which article you're referring to but the answer is "No... not for SELECT's". Even though a SORT won't show up on the execution plan, the only way to guarantee the order (seems like it's much better in 2k5 than 2k) is to use an order by on "N" in the Numbers or Tally table.

--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #840195
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse