How can you tell if the index is being used or not How would

How can you tell if the index is being used or not? How would this information help in optimizing our tuning a databases in MySQL.

Solution

we can tell that indexes which are not used by using the user_seeks,user_scans,user_lookups colomns

=>we should write query and should give conditions like following

where object_id.Database_id =Db_id(\'datbasename\')
and object_id.user_seeks=0
and object_id.user_scans=0
and object_id.user_lookups=0

by using this we can get the unused indexes

=>we can optimize the mysql database

1)by having indexes we can increase the speed of the retrival

2)by getting seek time we can check whether we can increase the speed o f accessing data from database

3)by usinf number of rows has been scanned we can decrease the number of rows to be scanned to get the data

How can you tell if the index is being used or not? How would this information help in optimizing our tuning a databases in MySQL.Solutionwe can tell that index

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site