Wednesday, September 24, 2008
Question :: When using index (not using hint) in a select statement without 'GroupBy' or 'OrderBy' in what sequence do the records occur
When using index (not using hint) in a select statement without 'GroupBy' or'OrderBy' in what sequence do the records occurAnswer:When using Index hint, the index chosen is hinted to the SQL server as theone that should be used for the query.(you shouldn't use this unless you are very sure that's the best selectiveindex there ever will be for the table)the index (without hint) is interpreted into a simple ORDER BY clause, sothe records will be ordered in the order of the fields from the index.( you can turn on logging SQL statements and see the actual query being sentto the server)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment