1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
3
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>IndexUsage</title><link rel="stylesheet" type="text/css" href="../../styles/main.css"><script language=JavaScript src="../../javascript/main.js"></script><script language=JavaScript src="../../javascript/prettify.js"></script><script language=JavaScript src="../../javascript/searchdata.js"></script></head><body class="ContentPage" onLoad="NDOnLoad();prettyPrint();"><script language=JavaScript><!--
4
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
6
<!-- Generated by Natural Docs, version 1.52 -->
7
<!-- http://www.naturaldocs.org -->
9
<!-- saved from url=(0026)http://www.naturaldocs.org -->
14
<div id=Content><div class="CClass"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="IndexUsage"></a>IndexUsage</h1><div class=CBody><p>IndexUsage tracks index and tables usage of queries. It can then show which indexes are not used. You use it by telling it about all the tables and indexes that exist, and then you give it index usage stats from <a href="ExplainAnalyzer-pm.html#ExplainAnalyzer" class=LClass id=link9 onMouseOver="ShowTip(event, 'tt9', 'link9')" onMouseOut="HideTip('tt9')">ExplainAnalyzer</a>. Afterwards, you ask it to show you unused indexes.</p><p>If the object is created with a dbh and db, then results (the indexes, tables, queries and index usages) are saved in tables.</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#IndexUsage" >IndexUsage</a></td><td class=SDescription>IndexUsage tracks index and tables usage of queries. </td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#IndexUsage.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#IndexUsage.new" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">new</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#IndexUsage.add_indexes" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">add_indexes</a></td><td class=SDescription>Tell the object that an index exists. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#IndexUsage.add_query" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">add_query</a></td><td class=SDescription>Tell the object that a unique query (class) exists.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#IndexUsage.add_table_usage" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">add_table_usage</a></td><td class=SDescription>Increase usage count for table (even if no indexes in it are used). </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#IndexUsage.add_index_usage" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">add_index_usage</a></td><td class=SDescription>Save information about how a query used an index.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#IndexUsage.find_unused_indexes" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">find_unused_indexes</a></td><td class=SDescription>Find unused indexes and pass them to the callback. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#IndexUsage.save_results" id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')">save_results</a></td><td class=SDescription>Save all the table, index and query usage information to tables. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#IndexUsage._d" id=link8 onMouseOver="ShowTip(event, 'tt8', 'link8')" onMouseOut="HideTip('tt8')">_d</a></td><td class=SDescription></td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
16
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="IndexUsage.Functions"></a>Functions</h3></div></div>
18
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="IndexUsage.new"></a>new</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub new</td></tr></table></blockquote><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>%args</td><td class=CDLDescription>Arguments</td></tr></table><h4 class=CHeading>Returns</h4><p>IndexUsage object</p></div></div></div>
20
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="IndexUsage.add_indexes"></a>add_indexes</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub add_indexes</td></tr></table></blockquote><p>Tell the object that an index exists. Internally, it just creates usage counters for the index and the table it belongs to.</p><h4 class=CHeading>Parameteres</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>%args</td><td class=CDLDescription>Arguments</td></tr></table><h4 class=CHeading>Required Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>db</td><td class=CDLDescription>Database name</td></tr><tr><td class=CDLEntry>tbl</td><td class=CDLDescription>Table name</td></tr><tr><td class=CDLEntry>indexes</td><td class=CDLDescription>Hashref to an indexes struct returned by <a href="TableParser-pm.html#TableParser.get_keys" class=LFunction id=link10 onMouseOver="ShowTip(event, 'tt10', 'link10')" onMouseOut="HideTip('tt10')">TableParser::get_keys()</a></td></tr></table></div></div></div>
22
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="IndexUsage.add_query"></a>add_query</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub add_query</td></tr></table></blockquote><p>Tell the object that a unique query (class) exists.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>%args</td><td class=CDLDescription>Arguments</td></tr></table><h4 class=CHeading>Required Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>query_id</td><td class=CDLDescription>Query ID (hex checksum of fingerprint)</td></tr><tr><td class=CDLEntry>fingerprint</td><td class=CDLDescription>Query fingerprint (<a href="QueryRewriter-pm.html#QueryRewriter.fingerprint" class=LFunction id=link11 onMouseOver="ShowTip(event, 'tt11', 'link11')" onMouseOut="HideTip('tt11')">QueryRewriter::fingerprint()</a>)</td></tr><tr><td class=CDLEntry>sample</td><td class=CDLDescription>Query SQL</td></tr></table></div></div></div>
24
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="IndexUsage.add_table_usage"></a>add_table_usage</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub add_table_usage</td></tr></table></blockquote><p>Increase usage count for table (even if no indexes in it are used). If saving results, the tables table is updated, too.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>%args</td><td class=CDLDescription>Arguments</td></tr></table><h4 class=CHeading>Required Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>db</td><td class=CDLDescription>Database name</td></tr><tr><td class=CDLEntry>tbl</td><td class=CDLDescription>Table name</td></tr></table></div></div></div>
26
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="IndexUsage.add_index_usage"></a>add_index_usage</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub add_index_usage</td></tr></table></blockquote><p>Save information about how a query used an index.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>%args</td><td class=CDLDescription>Arguments</td></tr></table><h4 class=CHeading>Required Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>usage</td><td class=CDLDescription>Uusage information, in the same format as the output from <a href="ExplainAnalyzer-pm.html#ExplainAnalyzer.get_index_usage" class=LFunction id=link12 onMouseOver="ShowTip(event, 'tt12', 'link12')" onMouseOut="HideTip('tt12')">ExplainAnalyzer::get_index_usage()</a></td></tr></table><h4 class=CHeading>Optional Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>query_id</td><td class=CDLDescription>Query ID, if saving results; see <a href="#IndexUsage.save_results" class=LFunction id=link13 onMouseOver="ShowTip(event, 'tt7', 'link13')" onMouseOut="HideTip('tt7')">save_results()</a></td></tr></table></div></div></div>
28
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="IndexUsage.find_unused_indexes"></a>find_unused_indexes</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub find_unused_indexes</td></tr></table></blockquote><p>Find unused indexes and pass them to the callback. For every table in every database, determine whether each index was used or not. But only if the table was used. Don’t say “this index should be dropped” if the table was never queried. For each table, collect the unused indexes and execute the callback subroutine with a hashref that looks like this:</p><blockquote><pre class="prettyprint">{ db => db, tbl => tbl, idx => [<list of unused indexes on this table>] }</pre></blockquote><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$callback</td><td class=CDLDescription>Coderef called with unused indexes</td></tr></table></div></div></div>
30
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="IndexUsage.save_results"></a>save_results</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub save_results</td></tr></table></blockquote><p>Save all the table, index and query usage information to tables. This sub should only be called once! If it’s called a second time, the cnt columns will be updated with their current val + this object’s cnt value because of “ON DUPLICATE KEY UPDATE cnt = cnt + ?”. This is required so that the tool can be ran multiple times, updating saved result counts each time. Thus, the tool should only call this sub once. Then it needs to create a new IndexUsage object (unless we implement a reset() sub).</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>%args</td><td class=CDLDescription>Arguments</td></tr></table><h4 class=CHeading>Required Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>dbh</td><td class=CDLDescription>DBH</td></tr><tr><td class=CDLEntry>db</td><td class=CDLDescription>Database where mk-index-usage --save-results tables are located</td></tr></table></div></div></div>
32
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="IndexUsage._d"></a>_d</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub _d</td></tr></table></blockquote></div></div></div>
37
<div id=Footer><a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->
40
<div id=Menu><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Modules</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MFile><a href="Advisor-pm.html">Advisor</a></div></div><div class=MEntry><div class=MFile><a href="AdvisorRules-pm.html">AdvisorRules</a></div></div><div class=MEntry><div class=MFile><a href="BinaryLogParser-pm.html">BinaryLogParser</a></div></div><div class=MEntry><div class=MFile><a href="ChangeHandler-pm.html">ChangeHandler</a></div></div><div class=MEntry><div class=MFile><a href="CompareQueryTimes-pm.html">CompareQueryTimes</a></div></div><div class=MEntry><div class=MFile><a href="CompareResults-pm.html">CompareResults</a></div></div><div class=MEntry><div class=MFile><a href="CompareTableStructs-pm.html">CompareTableStructs</a></div></div><div class=MEntry><div class=MFile><a href="CompareWarnings-pm.html">CompareWarnings</a></div></div><div class=MEntry><div class=MFile><a href="CopyRowsInsertSelect-pm.html">CopyRowsInsertSelect</a></div></div><div class=MEntry><div class=MFile><a href="Daemon-pm.html">Daemon</a></div></div><div class=MEntry><div class=MFile><a href="DSNParser-pm.html">DSNParser</a></div></div><div class=MEntry><div class=MFile><a href="DuplicateKeyFinder-pm.html">DuplicateKeyFinder</a></div></div><div class=MEntry><div class=MFile><a href="EventAggregator-pm.html">EventAggregator</a></div></div><div class=MEntry><div class=MFile><a href="EventTimeline-pm.html">EventTimeline</a></div></div><div class=MEntry><div class=MFile><a href="ExecutionThrottler-pm.html">ExecutionThrottler</a></div></div><div class=MEntry><div class=MFile><a href="ExplainAnalyzer-pm.html">ExplainAnalyzer</a></div></div><div class=MEntry><div class=MFile><a href="FileIterator-pm.html">FileIterator</a></div></div><div class=MEntry><div class=MFile><a href="ForeignKeyIterator-pm.html">ForeignKeyIterator</a></div></div><div class=MEntry><div class=MFile><a href="GeneralLogParser-pm.html">GeneralLogParser</a></div></div><div class=MEntry><div class=MFile><a href="HTTPProtocolParser-pm.html">HTTPProtocolParser</a></div></div><div class=MEntry><div class=MFile id=MSelected>IndexUsage</div></div><div class=MEntry><div class=MFile><a href="InnoDBStatusParser-pm.html">InnoDBStatusParser</a></div></div><div class=MEntry><div class=MFile><a href="KeySize-pm.html">KeySize</a></div></div><div class=MEntry><div class=MFile><a href="LogSplitter-pm.html">LogSplitter</a></div></div><div class=MEntry><div class=MFile><a href="MaatkitTest-pm.html">MaatkitTest</a></div></div><div class=MEntry><div class=MFile><a href="MasterSlave-pm.html">MasterSlave</a></div></div><div class=MEntry><div class=MFile><a href="MemcachedEvent-pm.html">MemcachedEvent</a></div></div><div class=MEntry><div class=MFile><a href="MemcachedProtocolParser-pm.html">MemcachedProtocolParser</a></div></div><div class=MEntry><div class=MFile><a href="MockSth-pm.html">MockSth</a></div></div><div class=MEntry><div class=MFile><a href="MockSync-pm.html">MockSync</a></div></div><div class=MEntry><div class=MFile><a href="MockSyncStream-pm.html">MockSyncStream</a></div></div><div class=MEntry><div class=MFile><a href="MySQLConfig-pm.html">MySQLConfig</a></div></div><div class=MEntry><div class=MFile><a href="MySQLConfigComparer-pm.html">MySQLConfigComparer</a></div></div><div class=MEntry><div class=MFile><a href="MySQLDump-pm.html">MySQLDump</a></div></div><div class=MEntry><div class=MFile><a href="MySQLProtocolParser-pm.html">MySQLProtocolParser</a></div></div><div class=MEntry><div class=MFile><a href="OptionParser-pm.html">OptionParser</a></div></div><div class=MEntry><div class=MFile><a href="OSCCaptureSync-pm.html">OSCCaptureSync</a></div></div><div class=MEntry><div class=MFile><a href="Outfile-pm.html">Outfile</a></div></div><div class=MEntry><div class=MFile><a href="PgLogParser-pm.html">PgLogParser</a></div></div><div class=MEntry><div class=MFile><a href="Pipeline-pm.html">Pipeline</a></div></div><div class=MEntry><div class=MFile><a href="PodParser-pm.html">PodParser</a></div></div><div class=MEntry><div class=MFile><a href="Processlist-pm.html">Processlist</a></div></div><div class=MEntry><div class=MFile><a href="ProcesslistAggregator-pm.html">ProcesslistAggregator</a></div></div><div class=MEntry><div class=MFile><a href="Progress-pm.html">Progress</a></div></div><div class=MEntry><div class=MFile><a href="ProtocolParser-pm.html">ProtocolParser</a></div></div><div class=MEntry><div class=MFile><a href="QueryAdvisorRules-pm.html">QueryAdvisorRules</a></div></div><div class=MEntry><div class=MFile><a href="QueryParser-pm.html">QueryParser</a></div></div><div class=MEntry><div class=MFile><a href="QueryReportFormatter-pm.html">QueryReportFormatter</a></div></div><div class=MEntry><div class=MFile><a href="QueryReview-pm.html">QueryReview</a></div></div><div class=MEntry><div class=MFile><a href="QueryRewriter-pm.html">QueryRewriter</a></div></div><div class=MEntry><div class=MFile><a href="Quoter-pm.html">Quoter</a></div></div><div class=MEntry><div class=MFile><a href="ReportFormatter-pm.html">ReportFormatter</a></div></div><div class=MEntry><div class=MFile><a href="Retry-pm.html">Retry</a></div></div><div class=MEntry><div class=MFile><a href="RowDiff-pm.html">RowDiff</a></div></div><div class=MEntry><div class=MFile><a href="Runtime-pm.html">Runtime</a></div></div><div class=MEntry><div class=MFile><a href="Sandbox-pm.html">Sandbox</a></div></div><div class=MEntry><div class=MFile><a href="Schema-pm.html">Schema</a></div></div><div class=MEntry><div class=MFile><a href="SchemaIterator-pm.html">SchemaIterator</a></div></div><div class=MEntry><div class=MFile><a href="SimpleTCPDumpParser-pm.html">SimpleTCPDumpParser</a></div></div><div class=MEntry><div class=MFile><a href="SlowLogParser-pm.html">SlowLogParser</a></div></div><div class=MEntry><div class=MFile><a href="SlowLogWriter-pm.html">SlowLogWriter</a></div></div><div class=MEntry><div class=MFile><a href="SQLParser-pm.html">SQLParser</a></div></div><div class=MEntry><div class=MFile><a href="SysLogParser-pm.html">SysLogParser</a></div></div><div class=MEntry><div class=MFile><a href="TableChecksum-pm.html">TableChecksum</a></div></div><div class=MEntry><div class=MFile><a href="TableChunker-pm.html">TableChunker</a></div></div><div class=MEntry><div class=MFile><a href="TableNibbler-pm.html">TableNibbler</a></div></div><div class=MEntry><div class=MFile><a href="TableParser-pm.html">TableParser</a></div></div><div class=MEntry><div class=MFile><a href="TableSyncChunk-pm.html">TableSyncChunk</a></div></div><div class=MEntry><div class=MFile><a href="TableSyncer-pm.html">TableSyncer</a></div></div><div class=MEntry><div class=MFile><a href="TableSyncGroupBy-pm.html">TableSyncGroupBy</a></div></div><div class=MEntry><div class=MFile><a href="TableSyncNibble-pm.html">TableSyncNibble</a></div></div><div class=MEntry><div class=MFile><a href="TableSyncStream-pm.html">TableSyncStream</a></div></div><div class=MEntry><div class=MFile><a href="TableUsage-pm.html">TableUsage</a></div></div><div class=MEntry><div class=MFile><a href="TcpdumpParser-pm.html">TcpdumpParser</a></div></div><div class=MEntry><div class=MFile><a href="TCPRequestAggregator-pm.html">TCPRequestAggregator</a></div></div><div class=MEntry><div class=MFile><a href="TextResultSetParser-pm.html">TextResultSetParser</a></div></div><div class=MEntry><div class=MFile><a href="TimeSeriesTrender-pm.html">TimeSeriesTrender</a></div></div><div class=MEntry><div class=MFile><a href="Transformers-pm.html">Transformers</a></div></div><div class=MEntry><div class=MFile><a href="UpgradeReportFormatter-pm.html">UpgradeReportFormatter</a></div></div><div class=MEntry><div class=MFile><a href="VariableAdvisorRules-pm.html">VariableAdvisorRules</a></div></div><div class=MEntry><div class=MFile><a href="VersionParser-pm.html">VersionParser</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent2')">Tools</a><div class=MGroupContent id=MGroupContent2><div class=MEntry><div class=MFile><a href="../tools/pt-archiver-pm.html">pt_archiver</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-config-diff-pm.html">pt_config_diff</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-deadlock-logger-pm.html">pt_deadlock_logger</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-duplicate-key-checker-pm.html">pt_duplicate_key_checker</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-fifo-split-pm.html">pt_fifo_split</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-find-pm.html">pt_find</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-fk-error-logger-pm.html">pt_fk_error_logger</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-heartbeat-pm.html">pt_heartbeat</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-index-usage-pm.html">pt_index_usage</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-kill-pm.html">pt_kill</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-log-player-pm.html">pt_log_player</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-online-schema-change-pm.html">pt_online_schema_change</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-profile-compact-pm.html">pt_profile_compact</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-query-advisor-pm.html">pt_query_advisor</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-query-digest-pm.html">pt_query_digest</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-query-profiler-pm.html">pt_query_profiler</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-schema-advisor-pm.html">pt_schema_advisor</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-show-grants-pm.html">pt_show_grants</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-slave-delay-pm.html">pt_slave_delay</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-slave-find-pm.html">pt_slave_find</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-slave-restart-pm.html">pt_slave_restart</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-table-checksum-pm.html">pt_table_checksum</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-table-sync-pm.html">pt_table_sync</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-table-usage-pm.html">pt_table_usage</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-tcp-model-pm.html">pt_tcp_model</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-trend-pm.html">pt_trend</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-upgrade-pm.html">pt_upgrade</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-variable-advisor-pm.html">pt_variable_advisor</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-visual-explain-pm.html">pt_visual_explain</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent3')">Index</a><div class=MGroupContent id=MGroupContent3><div class=MEntry><div class=MIndex><a href="../../index/General.html">Everything</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Classes.html">Classes</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Functions.html">Functions</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Variables.html">Variables</a></div></div></div></div></div><script type="text/javascript"><!--
41
var searchPanel = new SearchPanel("searchPanel", "HTML", "../../search");
42
--></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option id=MSearchEverything selected value="General">Everything</option><option value="Classes">Classes</option><option value="Functions">Functions</option><option value="Variables">Variables</option></select></div><script language=JavaScript><!--
43
HideAllBut([1], 4);// --></script></div><!--Menu-->
47
<!--START_ND_TOOLTIPS-->
48
<div class=CToolTip id="tt1"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub new</td></tr></table></blockquote></div></div><div class=CToolTip id="tt2"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub add_indexes</td></tr></table></blockquote>Tell the object that an index exists. </div></div><div class=CToolTip id="tt3"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub add_query</td></tr></table></blockquote>Tell the object that a unique query (class) exists.</div></div><div class=CToolTip id="tt4"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub add_table_usage</td></tr></table></blockquote>Increase usage count for table (even if no indexes in it are used). </div></div><div class=CToolTip id="tt5"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub add_index_usage</td></tr></table></blockquote>Save information about how a query used an index.</div></div><div class=CToolTip id="tt6"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub find_unused_indexes</td></tr></table></blockquote>Find unused indexes and pass them to the callback. </div></div><div class=CToolTip id="tt7"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub save_results</td></tr></table></blockquote>Save all the table, index and query usage information to tables. </div></div><div class=CToolTip id="tt8"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub _d</td></tr></table></blockquote></div></div><div class=CToolTip id="tt9"><div class=CClass>ExplainAnalyzer contains utility methods for getting and manipulating EXPLAIN data. </div></div><div class=CToolTip id="tt10"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub get_keys</td></tr></table></blockquote></div></div><div class=CToolTip id="tt11"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub fingerprint</td></tr></table></blockquote></div></div><div class=CToolTip id="tt12"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub get_index_usage</td></tr></table></blockquote></div></div><!--END_ND_TOOLTIPS-->
53
<div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>
56
<script language=JavaScript><!--
57
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>
b'\\ No newline at end of file'