{* * Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com) * * @author Jpresta * @copyright Jpresta * @license See the license of this module in file LICENSE.txt, thank you. *}
{if isset($tables) && (count($tables) > 0)}
{l s='Tables used in this query' mod=$module_name}
{foreach $tables as $tableName => $rowCount} {/foreach}
{l s='Table' mod=$module_name} {l s='Row count' mod=$module_name}
{$tableName|escape:'html':'UTF-8'} {$rowCount|intval}
{/if}
{l s='Example of query with real parameters' mod=$module_name}
{if !empty($sql)}
{$sql nofilter}
{else}
{$query->getExampleQuery()|trim|escape:'html':'UTF-8'}
{/if}
{if isset($explain) && (count($explain) > 0)}
{l s='"EXPLAIN" of the query' mod=$module_name}
{foreach $explain[0] as $colName => $colValue} {/foreach} {foreach $explain as $row} {foreach $row as $col} {/foreach} {/foreach}
{$colName|escape:'html':'UTF-8'}
{$col|escape:'html':'UTF-8'}
{/if} {if isset($indexes) && count($indexes) > 0}
{l s='Indexes created from here' mod=$module_name}
{l s='Suggested indexes do not always improve SQL queries. If you do not see any improvements, then you can delete them.' mod=$module_name}
{foreach $indexes as $index} {/foreach}
{l s='Index name' mod=$module_name} {l s='Table' mod=$module_name} {l s='Columns' mod=$module_name} {l s='Actions' mod=$module_name}
{$index['index']|escape:'html':'UTF-8'} {$index['table']|escape:'html':'UTF-8'} {$index['columns']|escape:'html':'UTF-8'} delete {l s='Delete this index' mod=$module_name}
{/if} {if isset($suggestions)}
{l s='Suggestions or tips' mod=$module_name}
{if count($suggestions) === 0}
:-( {l s='Sorry, no suggestion found for this query' mod=$module_name}
{else} {foreach $suggestions as $suggestion}
{$suggestion.msg|escape:'html':'UTF-8'} {if isset($suggestion.action) && isset($suggestion.action_label) } arrow_right_alt {$suggestion.action_label|escape:'javascript':'UTF-8'} {/if}
{/foreach} {/if}
{/if} {if count($callstacks) > 0}
{l s='Callstacks' mod=$module_name}
{foreach $callstacks as $callstack} {/foreach}
{l s='Executions count' mod=$module_name} {l s='Callstacks' mod=$module_name}
{$callstack->getExecutedCount()|intval} {$callstack->getCaller()|escape:'html':'UTF-8'}
{/if}
{l s='Actions' mod=$module_name}
{if isset($duration_ms)}

warning {l s='Please note, this duration may vary depending on the current server load. We recommend running the query multiple times with and without optimizations to be able to compare.' mod=$module_name}

{l s='Current duration of the query' mod=$module_name}: {$duration_ms|escape:'html':'UTF-8'}ms ({$query->getDurationMaxMs()|round}ms)
{if $duration_percent > 5 && $duration_diff < -2} {l s='The query is faster than during the profiling' mod=$module_name}: {$duration_percent|escape:'html':'UTF-8'}% ({$duration_diff|intval}ms)
{elseif $duration_percent < -5 && $duration_diff > 2} {l s='The query is slower than during the profiling' mod=$module_name}: {$duration_percent|escape:'html':'UTF-8'}% ({$duration_diff|intval}ms)
{else} {l s='The query is almost as fast as during the profiling' mod=$module_name}: {$duration_percent|escape:'html':'UTF-8'}% ({$duration_diff|intval}ms)
{/if}
{/if}