Interesting Observation - Effect of Clustered Index over Nonclustered(blog.sqlauthority.com)

submitted by pinaldavepinaldave(9662) 3 years, 3 months ago

Query optimization is one art which is difficult to master. Just like any other art this requires creativity and imagination as well understanding of subject matter. Let us look at interesting observation which I came across. In our example we have one query which is not using any index. On the same table there is already nonclustered index created, which is also not being used. Now when we created clustered index on the same table, our query suddenly started to use nonclustered index which was so far it is not using. The interesting part of this is that query is using nonclustered index when clustered index is created on the same.

2 comments |category: |Views: 199

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by cdbhcdbh(0) 3 years, 3 months ago 0

Interesting, where do you get this kind of ideas?

Reply

posted by calebtcalebt(300) 3 years, 3 months ago 0

Not sure how useful this observation is since the example is only using 5 rows in the table. I imagine you'd see different behavior from the query optimizer if there were more rows in the table.

Reply

information Login or create an account to comment on this story