Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
T-SQL (SS2K8)
»
index is not working while using ROW_NUMBER
13 posts, Page 2 of 2
««
1
2
index is not working while using ROW_NUMBER
Rate Topic
Display Mode
Topic Options
Author
Message
Anuj Rathi
Anuj Rathi
Posted Sunday, February 24, 2013 10:15 AM
SSC Journeyman
Group: General Forum Members
Last Login: Friday, March 22, 2013 3:01 AM
Points: 93,
Visits: 163
thanks for this valuable advice.
Post #1423423
Anuj Rathi
Anuj Rathi
Posted Sunday, February 24, 2013 9:19 PM
SSC Journeyman
Group: General Forum Members
Last Login: Friday, March 22, 2013 3:01 AM
Points: 93,
Visits: 163
If I use any other column which is in NCI (& not PK), then this is a seek.
NCI is same in both situations. Difference is only is Row_Number order by column. Please check the attached two execution plans. One is Row_Number with PK & second one is Row_Number with any other column.
one shows SCAN & another one shows SEEK. Difference is only in Row_Number order by column.
Post Attachments
RowNum_with_PK.png
(
1 view,
36.39 KB
)
RowNum_with_NCI_Column.png
(
0 views,
39.02 KB
)
Post #1423468
GilaMonster
GilaMonster
Posted Monday, February 25, 2013 1:56 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 6:47 AM
Points: 37,698,
Visits: 29,960
Please post table definitions, index definitions and execution plan, as per
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Pictures of the plan are pretty useless.
Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild
: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter
We stand on the bridge and no one may pass
Post #1423495
« Prev Topic
|
Next Topic »
13 posts, Page 2 of 2
««
1
2
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.