← Back to team overview

maria-developers team mailing list archive

Re: New (by Shinguz): Index usage tracker (103)



>>>>> "Arjen" == Arjen Lentz <arjen@xxxxxxxxxxxxx> writes:

Arjen> Hi
Arjen> On 10/03/2010, at 9:29 PM, worklog-noreply@xxxxxxxxxxxx wrote:
>> -----------------------------------------------------------------------
>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 
>> =-
>> TASK...........: Index usage tracker
>> CREATION DATE..: Wed, 10 Mar 2010, 11:29
>> SUPERVISOR.....: Bothorsen
>> What indexes are needed is often easy to find. What is more  
>> difficult is to find
>> which indexes are not used at all.
>> Thus some statistics about the index usage would be nice.
>> I think Percona has already something like this done some time ago.  
>> And big O
>> has similar functionality.

Arjen> For appropriate credit: it comes from the Google patches, released by  
Arjen> Mark Callaghan.
Arjen> It's in the Percona and OurDelta 5.0 builds.

Arjen> SHOW INDEX STATISTICS, or more useful the INDEX_STATISTICS table in  
Arjen> information_schema.
Arjen> More useful since then it can be LEFT JOINed onto the other infoschema  
Arjen> tables that know which indexes exist, thus easily identifying unused  
Arjen> ones.

Arjen> For reference on what the table shows, see the patch - easy to find in  
Arjen> the lp:ourdelta repo.
Arjen> Let's not just reinvent from scratch please.

The patches are already in MariaDB 5.2 since some time ago.

I have updated the worklog accordingly.