Compare Query Plans

Comparing the query plans of two TPCC benchmarks: A and B.

  • A benchmarked commit 6076fed using the Gen4 query planner.
  • B benchmarked commit bedcf51 using the Gen4 query planner.

Queries are ordered from the slowest to the fastest. The 50 slowest queries are shown.

select no_o_id from new_orders1 where no_d_id = :no_d_id and no_w_id = :no_d_id order by no_o_id asc limit :vtg1 for update
Only A
select d_next_o_id, d_tax from district1 where d_w_id = :d_w_id and d_id = :d_w_id for update
Only A
select d_next_o_id, d_tax from district1 where d_w_id = :d_w_id and d_id = :d_id for update
Only A
select count(distinct s.s_i_id) from stock1 as s join order_line1 as ol on ol.ol_w_id = s.s_w_id and ol.ol_i_id = s.s_i_id where ol.ol_w_id = :ol_ol_w_id and ol.ol_d_id = :ol_ol_w_id and ol.ol_o_id < :ol_ol_o_id and ol.ol_o_id >= :ol_ol_o_id1 and s.s_w_id = :ol_ol_w_id and s.s_quantity < :s_s_quantity
Only A
select count(distinct s.s_i_id) from stock1 as s join order_line1 as ol on ol.ol_w_id = s.s_w_id and ol.ol_i_id = s.s_i_id where ol.ol_w_id = :ol_ol_w_id and ol.ol_d_id = :ol_ol_d_id and ol.ol_o_id < :ol_ol_o_id and ol.ol_o_id >= :ol_ol_o_id1 and s.s_w_id = :ol_ol_w_id and s.s_quantity < :s_s_quantity
Only A
select count(distinct s.s_i_id) from stock1 as s join order_line1 as ol on ol.ol_w_id = s.s_w_id and ol.ol_i_id = s.s_i_id where ol.ol_w_id = :ol_ol_w_id and ol.ol_d_id = :ol_ol_d_id and ol.ol_o_id < :ol_ol_o_id and ol.ol_o_id >= :ol_ol_o_id1 and s.s_w_id = :ol_ol_w_id and s.s_quantity < :ol_ol_d_id
Only A
select c_first, c_middle, c_last, c_street_1, c_street_2, c_city, c_state, c_zip, c_phone, c_credit, c_credit_lim, c_discount, c_balance, c_ytd_payment, c_since from customer1 where c_w_id = :c_w_id and c_d_id = :c_w_id and c_id = :c_w_id for update
Only A
select o_id, o_carrier_id, o_entry_d from orders1 where o_w_id = :o_w_id and o_d_id = :o_d_id and o_c_id = :o_w_id order by o_id desc
Only A
select s_quantity, s_data, s_dist_03 as s_dist from stock1 where s_i_id = :s_i_id and s_w_id = :s_i_id for update
Only A
select o_id, o_carrier_id, o_entry_d from orders1 where o_w_id = :o_w_id and o_d_id = :o_w_id and o_c_id = :o_w_id order by o_id desc
Only A
select c_balance, c_first, c_middle, c_last from customer1 where c_w_id = :c_w_id and c_d_id = :c_w_id and c_id = :c_w_id
Only A
select c_discount, c_last, c_credit, w_tax from customer1 as c join warehouse1 as w on c_w_id = w_id where w_id = :w_id and c_d_id = :c_d_id and c_id = :w_id
Only A
select c_discount, c_last, c_credit, w_tax from customer1 as c join warehouse1 as w on c_w_id = w_id where w_id = :w_id and c_d_id = :c_d_id and c_id = :c_d_id
Only A
select c_first, c_middle, c_last, c_street_1, c_street_2, c_city, c_state, c_zip, c_phone, c_credit, c_credit_lim, c_discount, c_balance, c_ytd_payment, c_since from customer1 where c_w_id = :c_w_id and c_d_id = :c_d_id and c_id = :c_w_id for update
Only A
select c_discount, c_last, c_credit, w_tax from customer1 as c join warehouse1 as w on c_w_id = w_id where w_id = :w_id and c_d_id = :w_id and c_id = :c_id
Only A
select c_discount, c_last, c_credit, w_tax from customer1 as c join warehouse1 as w on c_w_id = w_id where w_id = :w_id and c_d_id = :c_d_id and c_id = :c_id
Only A
select c_first, c_middle, c_last, c_street_1, c_street_2, c_city, c_state, c_zip, c_phone, c_credit, c_credit_lim, c_discount, c_balance, c_ytd_payment, c_since from customer1 where c_w_id = :c_w_id and c_d_id = :c_d_id and c_id = :c_d_id for update
Only A
select no_o_id from new_orders1 where no_d_id = :no_d_id and no_w_id = :no_w_id order by no_o_id asc limit :vtg1 for update
Only A
select c_balance, c_first, c_middle, c_last from customer1 where c_w_id = :c_w_id and c_d_id = :c_w_id and c_id = :c_id
Only A
select c_balance, c_first, c_middle, c_last from customer1 where c_w_id = :c_w_id and c_d_id = :c_d_id and c_id = :c_id
Only A
select d_next_o_id from district1 where d_id = :d_id and d_w_id = :d_w_id
Only A
select d_next_o_id from district1 where d_id = :d_id and d_w_id = :d_id
Only A
select c_balance, c_first, c_middle, c_id from customer1 where c_w_id = :c_w_id and c_d_id = :c_d_id and c_last = :c_last order by c_first asc
Only A
select c_first, c_middle, c_last, c_street_1, c_street_2, c_city, c_state, c_zip, c_phone, c_credit, c_credit_lim, c_discount, c_balance, c_ytd_payment, c_since from customer1 where c_w_id = :c_w_id and c_d_id = :c_w_id and c_id = :c_id for update
Only A
select c_first, c_middle, c_last, c_street_1, c_street_2, c_city, c_state, c_zip, c_phone, c_credit, c_credit_lim, c_discount, c_balance, c_ytd_payment, c_since from customer1 where c_w_id = :c_w_id and c_d_id = :c_d_id and c_id = :c_id for update
Only A
select c_balance, c_first, c_middle, c_id from customer1 where c_w_id = :c_w_id and c_d_id = :c_w_id and c_last = :c_last order by c_first asc
Only A
select count(c_id) as namecnt from customer1 where c_w_id = :c_w_id and c_d_id = :c_d_id and c_last = :c_last
Only A
select count(c_id) as namecnt from customer1 where c_w_id = :c_w_id and c_d_id = :c_w_id and c_last = :c_last
Only A
select o_id, o_carrier_id, o_entry_d from orders1 where o_w_id = :o_w_id and o_d_id = :o_d_id and o_c_id = :o_c_id order by o_id desc
Only A
select o_id, o_carrier_id, o_entry_d from orders1 where o_w_id = :o_w_id and o_d_id = :o_w_id and o_c_id = :o_c_id order by o_id desc
Only A
select ol_i_id, ol_supply_w_id, ol_quantity, ol_amount, ol_delivery_d from order_line1 where ol_w_id = :ol_w_id and ol_d_id = :ol_d_id and ol_o_id = :ol_d_id
Only A
select ol_i_id, ol_supply_w_id, ol_quantity, ol_amount, ol_delivery_d from order_line1 where ol_w_id = :ol_w_id and ol_d_id = :ol_w_id and ol_o_id = :ol_w_id
Only A
select c_id from customer1 where c_w_id = :c_w_id and c_d_id = :c_w_id and c_last = :c_last order by c_first asc
Only A
select c_id from customer1 where c_w_id = :c_w_id and c_d_id = :c_d_id and c_last = :c_last order by c_first asc
Only A
select sum(ol_amount) as sm from order_line1 where ol_o_id = :ol_o_id and ol_d_id = :ol_d_id and ol_w_id = :ol_d_id
Only A
select w_street_1, w_street_2, w_city, w_state, w_zip, w_name from warehouse1 where w_id = :w_id
Only A
select d_street_1, d_street_2, d_city, d_state, d_zip, d_name from district1 where d_w_id = :d_w_id and d_id = :d_w_id
Only A
select d_street_1, d_street_2, d_city, d_state, d_zip, d_name from district1 where d_w_id = :d_w_id and d_id = :d_id
Only A
select sum(ol_amount) as sm from order_line1 where ol_o_id = :ol_o_id and ol_d_id = :ol_d_id and ol_w_id = :ol_w_id
Only A
select o_c_id from orders1 where o_id = :o_id and o_d_id = :o_d_id and o_w_id = :o_d_id
Only A
select i_price, i_name, i_data from item1 where i_id = :i_id
Only A
select s_quantity, s_data, s_dist_01 as s_dist from stock1 where s_i_id = :s_i_id and s_w_id = :s_w_id for update
Only A
select s_quantity, s_data, s_dist_03 as s_dist from stock1 where s_i_id = :s_i_id and s_w_id = :s_w_id for update
Only A
select s_quantity, s_data, s_dist_02 as s_dist from stock1 where s_i_id = :s_i_id and s_w_id = :s_w_id for update
Only A
select s_quantity, s_data, s_dist_04 as s_dist from stock1 where s_i_id = :s_i_id and s_w_id = :s_w_id for update
Only A
select s_quantity, s_data, s_dist_05 as s_dist from stock1 where s_i_id = :s_i_id and s_w_id = :s_w_id for update
Only A
select s_quantity, s_data, s_dist_08 as s_dist from stock1 where s_i_id = :s_i_id and s_w_id = :s_w_id for update
Only A
select s_quantity, s_data, s_dist_07 as s_dist from stock1 where s_i_id = :s_i_id and s_w_id = :s_w_id for update
Only A
select s_quantity, s_data, s_dist_06 as s_dist from stock1 where s_i_id = :s_i_id and s_w_id = :s_w_id for update
Only A
select s_quantity, s_data, s_dist_10 as s_dist from stock1 where s_i_id = :s_i_id and s_w_id = :s_w_id for update
Only A
select c_data from customer1 where c_w_id = :c_w_id and c_d_id = :c_d_id and c_id = :c_id
Only A
select s_quantity, s_data, s_dist_09 as s_dist from stock1 where s_i_id = :s_i_id and s_w_id = :s_w_id for update
Only A
select c_data from customer1 where c_w_id = :c_w_id and c_d_id = :c_w_id and c_id = :c_id
Only A
select i_price, i_name, i_data from item1 where i_id = -:vtg1
Only A
select o_c_id from orders1 where o_id = :o_id and o_d_id = :o_d_id and o_w_id = :o_w_id
Only A
select no_o_id from new_orders1 where no_d_id = :no_d_id /* INT64 */ and no_w_id = :no_d_id /* INT64 */ order by no_o_id asc limit :vtg1 /* INT64 */ for update
Only B
select d_next_o_id, d_tax from district1 where d_w_id = :d_w_id /* INT64 */ and d_id = :d_w_id /* INT64 */ for update
Only B
select d_next_o_id, d_tax from district1 where d_w_id = :d_w_id /* INT64 */ and d_id = :d_id /* INT64 */ for update
Only B
select count(distinct s.s_i_id) from stock1 as s join order_line1 as ol on ol.ol_w_id = s.s_w_id and ol.ol_i_id = s.s_i_id where ol.ol_w_id = :ol_ol_w_id /* INT64 */ and ol.ol_d_id = :ol_ol_d_id /* INT64 */ and ol.ol_o_id < :ol_ol_o_id /* INT64 */ and ol.ol_o_id >= :ol_ol_o_id1 /* INT64 */ and s.s_w_id = :ol_ol_w_id /* INT64 */ and s.s_quantity < :ol_ol_d_id /* INT64 */
Only B
select count(distinct s.s_i_id) from stock1 as s join order_line1 as ol on ol.ol_w_id = s.s_w_id and ol.ol_i_id = s.s_i_id where ol.ol_w_id = :ol_ol_w_id /* INT64 */ and ol.ol_d_id = :ol_ol_w_id /* INT64 */ and ol.ol_o_id < :ol_ol_o_id /* INT64 */ and ol.ol_o_id >= :ol_ol_o_id1 /* INT64 */ and s.s_w_id = :ol_ol_w_id /* INT64 */ and s.s_quantity < :s_s_quantity /* INT64 */
Only B
select count(distinct s.s_i_id) from stock1 as s join order_line1 as ol on ol.ol_w_id = s.s_w_id and ol.ol_i_id = s.s_i_id where ol.ol_w_id = :ol_ol_w_id /* INT64 */ and ol.ol_d_id = :ol_ol_d_id /* INT64 */ and ol.ol_o_id < :ol_ol_o_id /* INT64 */ and ol.ol_o_id >= :ol_ol_o_id1 /* INT64 */ and s.s_w_id = :ol_ol_w_id /* INT64 */ and s.s_quantity < :s_s_quantity /* INT64 */
Only B
select c_balance, c_first, c_middle, c_last from customer1 where c_w_id = :c_w_id /* INT64 */ and c_d_id = :c_d_id /* INT64 */ and c_id = :c_d_id /* INT64 */
Only B
select o_id, o_carrier_id, o_entry_d from orders1 where o_w_id = :o_w_id /* INT64 */ and o_d_id = :o_d_id /* INT64 */ and o_c_id = :o_w_id /* INT64 */ order by o_id desc
Only B
select c_discount, c_last, c_credit, w_tax from customer1 as c join warehouse1 as w on c_w_id = w_id where w_id = :w_id /* INT64 */ and c_d_id = :c_d_id /* INT64 */ and c_id = :w_id /* INT64 */
Only B
select c_first, c_middle, c_last, c_street_1, c_street_2, c_city, c_state, c_zip, c_phone, c_credit, c_credit_lim, c_discount, c_balance, c_ytd_payment, c_since from customer1 where c_w_id = :c_w_id /* INT64 */ and c_d_id = :c_w_id /* INT64 */ and c_id = :c_w_id /* INT64 */ for update
Only B
select o_id, o_carrier_id, o_entry_d from orders1 where o_w_id = :o_w_id /* INT64 */ and o_d_id = :o_d_id /* INT64 */ and o_c_id = :o_d_id /* INT64 */ order by o_id desc
Only B
select s_quantity, s_data, s_dist_08 as s_dist from stock1 where s_i_id = :s_i_id /* INT64 */ and s_w_id = :s_i_id /* INT64 */ for update
Only B
select c_discount, c_last, c_credit, w_tax from customer1 as c join warehouse1 as w on c_w_id = w_id where w_id = :w_id /* INT64 */ and c_d_id = :c_d_id /* INT64 */ and c_id = :c_d_id /* INT64 */
Only B
select c_first, c_middle, c_last, c_street_1, c_street_2, c_city, c_state, c_zip, c_phone, c_credit, c_credit_lim, c_discount, c_balance, c_ytd_payment, c_since from customer1 where c_w_id = :c_w_id /* INT64 */ and c_d_id = :c_d_id /* INT64 */ and c_id = :c_d_id /* INT64 */ for update
Only B
select no_o_id from new_orders1 where no_d_id = :no_d_id /* INT64 */ and no_w_id = :no_w_id /* INT64 */ order by no_o_id asc limit :vtg1 /* INT64 */ for update
Only B
select c_discount, c_last, c_credit, w_tax from customer1 as c join warehouse1 as w on c_w_id = w_id where w_id = :w_id /* INT64 */ and c_d_id = :c_d_id /* INT64 */ and c_id = :c_id /* INT64 */
Only B
select c_discount, c_last, c_credit, w_tax from customer1 as c join warehouse1 as w on c_w_id = w_id where w_id = :w_id /* INT64 */ and c_d_id = :w_id /* INT64 */ and c_id = :c_id /* INT64 */
Only B
select c_balance, c_first, c_middle, c_last from customer1 where c_w_id = :c_w_id /* INT64 */ and c_d_id = :c_d_id /* INT64 */ and c_id = :c_id /* INT64 */
Only B
select c_first, c_middle, c_last, c_street_1, c_street_2, c_city, c_state, c_zip, c_phone, c_credit, c_credit_lim, c_discount, c_balance, c_ytd_payment, c_since from customer1 where c_w_id = :c_w_id /* INT64 */ and c_d_id = :c_d_id /* INT64 */ and c_id = :c_w_id /* INT64 */ for update
Only B
select c_balance, c_first, c_middle, c_last from customer1 where c_w_id = :c_w_id /* INT64 */ and c_d_id = :c_w_id /* INT64 */ and c_id = :c_id /* INT64 */
Only B
select c_first, c_middle, c_last, c_street_1, c_street_2, c_city, c_state, c_zip, c_phone, c_credit, c_credit_lim, c_discount, c_balance, c_ytd_payment, c_since from customer1 where c_w_id = :c_w_id /* INT64 */ and c_d_id = :c_w_id /* INT64 */ and c_id = :c_id /* INT64 */ for update
Only B
select d_next_o_id from district1 where d_id = :d_id /* INT64 */ and d_w_id = :d_id /* INT64 */
Only B
select d_next_o_id from district1 where d_id = :d_id /* INT64 */ and d_w_id = :d_w_id /* INT64 */
Only B
select c_first, c_middle, c_last, c_street_1, c_street_2, c_city, c_state, c_zip, c_phone, c_credit, c_credit_lim, c_discount, c_balance, c_ytd_payment, c_since from customer1 where c_w_id = :c_w_id /* INT64 */ and c_d_id = :c_d_id /* INT64 */ and c_id = :c_id /* INT64 */ for update
Only B
select c_balance, c_first, c_middle, c_id from customer1 where c_w_id = :c_w_id /* INT64 */ and c_d_id = :c_d_id /* INT64 */ and c_last = :c_last /* VARCHAR */ order by c_first asc
Only B
select c_balance, c_first, c_middle, c_id from customer1 where c_w_id = :c_w_id /* INT64 */ and c_d_id = :c_w_id /* INT64 */ and c_last = :c_last /* VARCHAR */ order by c_first asc
Only B
select count(c_id) as namecnt from customer1 where c_w_id = :c_w_id /* INT64 */ and c_d_id = :c_d_id /* INT64 */ and c_last = :c_last /* VARCHAR */
Only B
select count(c_id) as namecnt from customer1 where c_w_id = :c_w_id /* INT64 */ and c_d_id = :c_w_id /* INT64 */ and c_last = :c_last /* VARCHAR */
Only B
select o_id, o_carrier_id, o_entry_d from orders1 where o_w_id = :o_w_id /* INT64 */ and o_d_id = :o_d_id /* INT64 */ and o_c_id = :o_c_id /* INT64 */ order by o_id desc
Only B
select o_id, o_carrier_id, o_entry_d from orders1 where o_w_id = :o_w_id /* INT64 */ and o_d_id = :o_w_id /* INT64 */ and o_c_id = :o_c_id /* INT64 */ order by o_id desc
Only B
select ol_i_id, ol_supply_w_id, ol_quantity, ol_amount, ol_delivery_d from order_line1 where ol_w_id = :ol_w_id /* INT64 */ and ol_d_id = :ol_d_id /* INT64 */ and ol_o_id = :ol_d_id /* INT64 */
Only B
select ol_i_id, ol_supply_w_id, ol_quantity, ol_amount, ol_delivery_d from order_line1 where ol_w_id = :ol_w_id /* INT64 */ and ol_d_id = :ol_w_id /* INT64 */ and ol_o_id = :ol_w_id /* INT64 */
Only B
select c_id from customer1 where c_w_id = :c_w_id /* INT64 */ and c_d_id = :c_w_id /* INT64 */ and c_last = :c_last /* VARCHAR */ order by c_first asc
Only B
select c_id from customer1 where c_w_id = :c_w_id /* INT64 */ and c_d_id = :c_d_id /* INT64 */ and c_last = :c_last /* VARCHAR */ order by c_first asc
Only B
select sum(ol_amount) as sm from order_line1 where ol_o_id = :ol_o_id /* INT64 */ and ol_d_id = :ol_d_id /* INT64 */ and ol_w_id = :ol_d_id /* INT64 */
Only B
select w_street_1, w_street_2, w_city, w_state, w_zip, w_name from warehouse1 where w_id = :w_id /* INT64 */
Only B
select d_street_1, d_street_2, d_city, d_state, d_zip, d_name from district1 where d_w_id = :d_w_id /* INT64 */ and d_id = :d_w_id /* INT64 */
Only B
select d_street_1, d_street_2, d_city, d_state, d_zip, d_name from district1 where d_w_id = :d_w_id /* INT64 */ and d_id = :d_id /* INT64 */
Only B
select o_c_id from orders1 where o_id = :o_id /* INT64 */ and o_d_id = :o_d_id /* INT64 */ and o_w_id = :o_d_id /* INT64 */
Only B
select i_price, i_name, i_data from item1 where i_id = :i_id /* INT64 */
Only B
select sum(ol_amount) as sm from order_line1 where ol_o_id = :ol_o_id /* INT64 */ and ol_d_id = :ol_d_id /* INT64 */ and ol_w_id = :ol_w_id /* INT64 */
Only B
select s_quantity, s_data, s_dist_03 as s_dist from stock1 where s_i_id = :s_i_id /* INT64 */ and s_w_id = :s_w_id /* INT64 */ for update
Only B
select s_quantity, s_data, s_dist_04 as s_dist from stock1 where s_i_id = :s_i_id /* INT64 */ and s_w_id = :s_w_id /* INT64 */ for update
Only B
select s_quantity, s_data, s_dist_02 as s_dist from stock1 where s_i_id = :s_i_id /* INT64 */ and s_w_id = :s_w_id /* INT64 */ for update
Only B
select c_data from customer1 where c_w_id = :c_w_id /* INT64 */ and c_d_id = :c_w_id /* INT64 */ and c_id = :c_id /* INT64 */
Only B
select s_quantity, s_data, s_dist_01 as s_dist from stock1 where s_i_id = :s_i_id /* INT64 */ and s_w_id = :s_w_id /* INT64 */ for update
Only B
select s_quantity, s_data, s_dist_05 as s_dist from stock1 where s_i_id = :s_i_id /* INT64 */ and s_w_id = :s_w_id /* INT64 */ for update
Only B
select s_quantity, s_data, s_dist_06 as s_dist from stock1 where s_i_id = :s_i_id /* INT64 */ and s_w_id = :s_w_id /* INT64 */ for update
Only B
select s_quantity, s_data, s_dist_09 as s_dist from stock1 where s_i_id = :s_i_id /* INT64 */ and s_w_id = :s_w_id /* INT64 */ for update
Only B
select s_quantity, s_data, s_dist_10 as s_dist from stock1 where s_i_id = :s_i_id /* INT64 */ and s_w_id = :s_w_id /* INT64 */ for update
Only B
select c_data from customer1 where c_w_id = :c_w_id /* INT64 */ and c_d_id = :c_d_id /* INT64 */ and c_id = :c_id /* INT64 */
Only B
select s_quantity, s_data, s_dist_07 as s_dist from stock1 where s_i_id = :s_i_id /* INT64 */ and s_w_id = :s_w_id /* INT64 */ for update
Only B
select s_quantity, s_data, s_dist_08 as s_dist from stock1 where s_i_id = :s_i_id /* INT64 */ and s_w_id = :s_w_id /* INT64 */ for update
Only B
select i_price, i_name, i_data from item1 where i_id = -:vtg1 /* INT64 */
Only B
select o_c_id from orders1 where o_id = :o_id /* INT64 */ and o_d_id = :o_d_id /* INT64 */ and o_w_id = :o_w_id /* INT64 */
Only B