Skip to content

Instantly share code, notes, and snippets.

@olaurendeau
Created January 31, 2013 12:58
Show Gist options
  • Select an option

  • Save olaurendeau/4682671 to your computer and use it in GitHub Desktop.

Select an option

Save olaurendeau/4682671 to your computer and use it in GitHub Desktop.
mysql> explain SELECT DISTINCT r0_.id_reservation AS id_reservation0, r0_.create_dt AS create_dt1, l1_.phone AS phone2, r2_.name AS name3, c3_.code AS code4, p4_.name AS name5, r0_.create_dt AS create_dt6 FROM reservation r0_ INNER JOIN product p5_ ON r0_.id_product = p5_.id_product INNER JOIN product_localized_text p4_ ON p5_.id_product = p4_.id_product INNER JOIN campaign c3_ ON r0_.id_campaign = c3_.id_campaign INNER JOIN provider p6_ ON c3_.id_provider = p6_.id_provider INNER JOIN lfcustomer l1_ ON r0_.id_lfcustomer = l1_.id_lfcustomer INNER JOIN restaurant r2_ ON r0_.id_restaurant = r2_.id_restaurant INNER JOIN brand b7_ ON l1_.id_brand = b7_.id_brand INNER JOIN sale_type s8_ ON r0_.id_sale_type = s8_.id_sale_type WHERE r0_.is_request = 'listResa' ORDER BY r0_.create_dt DESC LIMIT 10 OFFSET 0;
+----+-------------+-------+--------+-----------------------------------------------------------------------------------------------------+----------------------+---------+------------------------------+-------+----------------------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+-------+--------+-----------------------------------------------------------------------------------------------------+----------------------+---------+------------------------------+-------+----------------------------------------------+
| 1 | SIMPLE | b7_ | index | PRIMARY | IDX_1C52F95867B77375 | 4 | NULL | 4 | Using index; Using temporary; Using filesort |
| 1 | SIMPLE | l1_ | ref | PRIMARY,IDX_E33325C6F2D7B868 | IDX_E33325C6F2D7B868 | 4 | fenix_main.b7_.id_brand | 90444 | |
| 1 | SIMPLE | r0_ | ref | IDX_42C8495546B9A511,IDX_42C849554E1F92E8,IDX_42C84955B0A59FEB,IDX_42C84955DD7ADDD,is_request_index | IDX_42C8495546B9A511 | 4 | fenix_main.l1_.id_lfcustomer | 1 | Using where |
| 1 | SIMPLE | c3_ | eq_ref | PRIMARY,IDX_1F1512DDC21F9F09 | PRIMARY | 4 | fenix_main.r0_.id_campaign | 1 | |
| 1 | SIMPLE | p6_ | eq_ref | PRIMARY | PRIMARY | 4 | fenix_main.c3_.id_provider | 1 | Using index |
| 1 | SIMPLE | r2_ | eq_ref | PRIMARY | PRIMARY | 4 | fenix_main.r0_.id_restaurant | 1 | |
| 1 | SIMPLE | s8_ | eq_ref | PRIMARY | PRIMARY | 4 | fenix_main.r0_.id_sale_type | 1 | Using index |
| 1 | SIMPLE | p4_ | ref | PRIMARY | PRIMARY | 4 | fenix_main.r0_.id_product | 1 | |
| 1 | SIMPLE | p5_ | eq_ref | PRIMARY | PRIMARY | 4 | fenix_main.p4_.id_product | 1 | Using where; Using index; Distinct |
+----+-------------+-------+--------+-----------------------------------------------------------------------------------------------------+----------------------+---------+------------------------------+-------+----------------------------------------------+
9 rows in set (0.00 sec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment