May 11, 2012 at 6:37 am
Hi Friends,
I am here to discuss the general topics of index....
One of my colleague says if we add filtering(where statement) , it will affect index. Is that true.? How far this is true?
Give me your suggestion friends...
Thanks,
Charmer
May 11, 2012 at 6:39 am
Do you mean the WHERE clause is in the index creation statement? Or do you mean in the SELECT statement you are using to query?
Follow me on twitter @EvoDBACheck out my blog Natural Selection DBA[/url]
May 11, 2012 at 6:42 am
Matthew Darwin (5/11/2012)
Do you mean the WHERE clause is in the index creation statement? Or do you mean in the SELECT statement you are using to query?
oh yeah Matthew...i mean in the select statement....while not in index creation
Thanks,
Charmer
May 11, 2012 at 6:51 am
Charmer (5/11/2012)
Hi Friends,I am here to discuss the general topics of index....
One of my colleague says if we add filtering(where statement) , it will affect index. Is that true.? How far this is true?
Give me your suggestion friends...
A little vague, so you might not get the answers you expect. Using a WHERE clause which utilises an index won't change that index - but the usage of the index will be logged.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
May 11, 2012 at 6:58 am
ChrisM@Work (5/11/2012)
Charmer (5/11/2012)
Hi Friends,I am here to discuss the general topics of index....
One of my colleague says if we add filtering(where statement) , it will affect index. Is that true.? How far this is true?
Give me your suggestion friends...
A little vague, so you might not get the answers you expect. Using a WHERE clause which utilises an index won't change that index - but the usage of the index will be logged.
i mean in the select statement if we use where condition (Column which is not in the index) , will affect index? in the performance wise?
Thanks,
Charmer
May 11, 2012 at 7:07 am
Charmer (5/11/2012)
ChrisM@Work (5/11/2012)
Charmer (5/11/2012)
Hi Friends,I am here to discuss the general topics of index....
One of my colleague says if we add filtering(where statement) , it will affect index. Is that true.? How far this is true?
Give me your suggestion friends...
A little vague, so you might not get the answers you expect. Using a WHERE clause which utilises an index won't change that index - but the usage of the index will be logged.
i mean in the select statement if we use where condition (Column which is not in the index) , will affect index? in the performance wise?
If you are using a column in your WHERE clause that is not in an index, you will end up with a table scan (or clustered index scan, which is the same thing).
Simply means it won't use an index to identify target records.
May 11, 2012 at 7:07 am
I think you have it backwards: if you use a WHERE clause in a SELECT statement, having an appropriate index on the column(s) that your WHERE clause is using will result in better performance.
If you have some examples of the code you are trying to use, we will be able to make it clearer through examples.
Follow me on twitter @EvoDBACheck out my blog Natural Selection DBA[/url]
May 11, 2012 at 7:13 am
Thank you Guys...i am clear now..
Thanks,
Charmer
May 11, 2012 at 7:13 am
Charmer (5/11/2012)
ChrisM@Work (5/11/2012)
Charmer (5/11/2012)
Hi Friends,I am here to discuss the general topics of index....
One of my colleague says if we add filtering(where statement) , it will affect index. Is that true.? How far this is true?
Give me your suggestion friends...
A little vague, so you might not get the answers you expect. Using a WHERE clause which utilises an index won't change that index - but the usage of the index will be logged.
i mean in the select statement if we use where condition (Column which is not in the index) , will affect index? in the performance wise?
The index itself will not be affected by running the query, whether or not the WHERE clause references a key or include column in the index.
If a column in the WHERE clause matches a key column of an index, it will likely be used. The optimiser may well choose to use an index even if a column in the WHERE clause isn't covered by the index, if the cost (including rid or key lookups) is calculated to be less than the alternative.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
May 11, 2012 at 7:15 am
Charmer (5/11/2012)
Thank you Guys...i am clear now..
You will be if you can find the time to read this excellent article by David Durant[/url].
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
May 11, 2012 at 7:20 am
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply