Monday 20 June 2011

When to index a particular column on what percentage ?


Generally if you are creating ordinary b-tree index, if you know that that columns will be mostly reference in select statement If yours select statement is retrieving more than 30 % rows then it's better not to use index.
Index will be used out of the table when you are retrieving smaller no. of rows
If you retrieving more no. of rows. You can read the table directly rather than using the index(Full table scan)

No comments:

Post a Comment