1 # include/expect_qep.inc
5 # Designed to be used together with include/check_qep.inc
7 # $query should be assigned a select statement using
8 # straight_join to force the tables to be joined in most
11 # expect_qep.inc will then store the estimated 'Last_query_cost'
12 # and total # 'Handler_read%' for this straight_joined query.
14 # We should then assign a non-straight_join'ed version of
15 # the same query to $query and execute it using
16 # 'include/check_qep.inc'. Its estimated cost and
17 # #handler_reads will then be verified against the
18 # previous straight_joined query.
22 # let $query= <select straight_join optimal statement>;
23 # --source include/expect_qep.inc
24 # let $query= <select statement>;
25 # --source include/check_qep.inc
28 # t/greedy_optimizer.test
36 query_get_value(SHOW
STATUS LIKE
'Last_query_cost', Value, 1);
39 `select sum(variable_value)
40 from information_schema.session_status
41 where VARIABLE_NAME like 'Handler_read%'`;
43 #echo Expect, cost: $best_cost, Handler_reads: $best_reads;