June 12, 2010 at 4:42 am
I have a table having 84000+ records, I am planning to consider index on this table. I am putting few details of execution plan below: -
When table has no Index: -
Select * from <table name>;
Table scan happens,
Estimated I/O cost = 0.517278
Estimated CPU cost = 0.0930076
Estimated operator cost = 0.610285(100%)
Estimated sub-tree cost = 0.610285
When table has clustered Index on id column: -
Clustered Index scan happens,
Estimated I/O cost = 0.517199
Estimated CPU cost = 0.0930861
Estimated operator cost = 0.610285(100%)
Estimated sub-tree cost = 0.610285
When table has Non-clustered Index on id column: -
Table scan happens,
Estimated I/O cost = 0.517199
Estimated CPU cost = 0.0930861
Estimated operator cost = 0.610285(100%)
Estimated sub-tree cost = 0.610285
Now my question is without indexing estimated CPU cost 0.0930076 is very less compare to others 0.0930861 and estimated I/O cost 0.517278 is higher than others 0.517199. Then which Index I need to create ? I am bit confused about this, please help.
June 12, 2010 at 1:25 pm
Duplicate post.
Discussion already started here
July 14, 2010 at 4:37 pm
the index that should you use
as you needs if you care about time you should use the speed of time of them
if you care more about the space you can use the most ones takes space
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply