1 # include/execute_with_statistics.inc
5 # Explain and execute the select statment in $query.
6 # Then report 'Last_query_cost' estimate from the query
7 # optimizer and total number of 'Handler_read%' when the
9 # Intended usage is to verify that there are not regressions
10 # in either calculated or actuall cost for $query.
14 # let $query= <select statement>;
15 # --source include/execute_with_statistics.inc
18 # t/greedy_optimizer.test
22 SHOW
STATUS LIKE
'Last_query_cost';
26 SELECT SUM(variable_value) AS Total_handler_reads
27 FROM information_schema.session_status
28 WHERE variable_name LIKE 'Handler_read%';