Skip to content

Instantly share code, notes, and snippets.

@hulucc
Created May 7, 2019 14:21
Show Gist options
  • Save hulucc/4065dd9317df1d62340c147b64f3365e to your computer and use it in GitHub Desktop.
Save hulucc/4065dd9317df1d62340c147b64f3365e to your computer and use it in GitHub Desktop.
Warning: Using a password on the command line interface can be insecure.
+----+----------------------------------+----------------------------+----------------------------+----------------------------+---------------------------+----------+----------+--------+-----------+--------------+----------------------------------------------------------------------------------------------------------+--------------------------+-------------+--------------+-------------+---------------------------------------------------------------+-----------------+-----------------+---------------+-----------+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+-----------------+-----------+----------------+-----------+-------------------+----+----------------------------------+----------------------------+----------------------------+----------------------------+------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+----------+--------+---------------+---------+---------------+----------------------------------+------------+-------------+-----------------+-----------+-----------+
| id | uid | created_at | updated_at | deactivated_at | name | avg_cost | province | city | district | business_hub | address | phone | latitude | longitude | business_id | business_remark | closing_time | opening_time | business_hour | geo_code | server_uid | json_data | openshopid | is_mark_offline | region_id | qualification | server_id | enable_membership | id | uid | created_at | updated_at | deactivated_at | name | description | sub_category | province | city | main_category | logo_id | main_video_id | server_uid | openshopid | shops_count | is_mark_offline | server_id | region_id |
+----+----------------------------------+----------------------------+----------------------------+----------------------------+---------------------------+----------+----------+--------+-----------+--------------+----------------------------------------------------------------------------------------------------------+--------------------------+-------------+--------------+-------------+---------------------------------------------------------------+-----------------+-----------------+---------------+-----------+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+-----------------+-----------+----------------+-----------+-------------------+----+----------------------------------+----------------------------+----------------------------+----------------------------+------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+----------+--------+---------------+---------+---------------+----------------------------------+------------+-------------+-----------------+-----------+-----------+
| 1 | 085d746258ca4cd9aa000ea30455d9b6 | 2018-09-26 14:52:58.483434 | 2019-04-16 11:39:40.128344 | 2018-09-28 11:42:19.800608 | (田尚坊商业中心店 | 0.00 | 上海 | 上海 | NULL | NULL | 钦州北路226号田尚坊商业中心地下一层B05(星巴克楼下) | 021-64688256,17317582638 | 31.18063600 | 121.41968700 | 1 | 下午13:30至17:00为午休时间,请您合理安排时间 | 23:30:00.000000 | 11:00:00.000000 | 0,1,2,3,4,5,6 | wtw36ur07 | NULL | {} | NULL | 0 | 2 | {"images": []} | -1 | 0 | 1 | 2a2f2e368fb145f199753d3124c575c6 | 2018-09-26 14:45:07.306367 | 2018-12-04 16:34:16.563401 | 2018-12-04 16:34:16.563249 | 明月苑烧肉酒场 | 来自东京川地道的烧肉料理,特色酒饮,以及宾至如归的日式气氛,带给您非凡的餐饮体验。 | 日本菜 | 上海 | 上海 | 餐饮 | 8 | NULL | NULL | NULL | 1 | 0 | -1 | 2 |
| 2 | f0b6aa2b029941f0bf0921073e1b18f7 | 2018-09-26 17:54:21.714056 | 2019-04-16 11:39:40.353553 | NULL | 测试溧阳路店 | 0.00 | 上海 | 上海 | NULL | NULL | 溧阳路735号半岛湾时尚创意文化产业园区2幢2106室(地铁四号线,十号线海伦路站) | 021-66078737 | 31.25533100 | 121.48907200 | 2 | | 09:00:00.000000 | 09:00:00.000000 | 0,1,2,3,4,5,6 | wtw3u9cek | NULL | {"share_buy": "https://forseti-cdn.wozaihui.com/shop_pic/4d911edb5f3e4f44835dff0684282927.png", "share_join": "https://forseti-cdn.wozaihui.com/shop_pic/0256cd04bb42422482ce4bc6827fe166.png"} | NULL | 0 | 2 | {"images": []} | -1 | 0 | 2 | 0c01c0bd27cd40b6860e517b094ed33b | 2018-09-26 17:42:35.086396 | 2019-04-02 17:29:49.797214 | NULL | 测试专用·Sharana Café&Bakery | sharana kitchen是一家由设计师创立,并集专业咖啡,手作美食于一体的味觉工作室,一家可以给人温暖和幸福感的咖啡馆。 | 咖啡厅 | 上海 | 上海 | 餐饮 | 20 | NULL | NULL | NULL | 1 | 0 | -1 | 2 |
| 3 | 3be1a75728414aa7be72276205bd826e | 2018-09-28 11:39:35.968938 | 2019-04-16 11:39:40.540436 | 2018-09-28 11:42:16.841373 | (田尚坊商业中心 | 0.00 | 上海 | 上海 | NULL | NULL | 钦州北路226号田尚坊商业中心地下一层B05(星巴克楼下) | 021-64688256,17317582638 | 31.18063600 | 121.41968700 | 1 | 下午13:30至17:00为午休时间,请您合理安排时间 | 23:30:00.000000 | 11:00:00.000000 | 0,1,2,3,4,5,6 | wtw36ur07 | NULL | {} | NULL | 0 | 2 | {"images": []} | -1 | 0 | 1 | 2a2f2e368fb145f199753d3124c575c6 | 2018-09-26 14:45:07.306367 | 2018-12-04 16:34:16.563401 | 2018-12-04 16:34:16.563249 | 明月苑烧肉酒场 | 来自东京川地道的烧肉料理,特色酒饮,以及宾至如归的日式气氛,带给您非凡的餐饮体验。 | 日本菜 | 上海 | 上海 | 餐饮 | 8 | NULL | NULL | NULL | 1 | 0 | -1 | 2 |
| 4 | e0b275d34f4a4b95badc83a7ad4128f5 | 2018-09-28 11:42:11.877491 | 2019-04-16 11:39:40.729827 | 2018-12-04 16:34:16.563249 | 田尚坊商业中心店 | 0.00 | 上海 | 上海 | NULL | NULL | 钦州北路226号田尚坊商业中心地下一层B05(星巴克楼下) | 021-64688256,17317582638 | 31.18063600 | 121.41968700 | 1 | 下午13:30至17:00为午休时间,请您合理安排时间 | 23:30:00.000000 | 11:00:00.000000 | 0,1,2,3,4,5,6 | wtw36ur07 | NULL | {} | NULL | 0 | 2 | {"images": []} | -1 | 0 | 1 | 2a2f2e368fb145f199753d3124c575c6 | 2018-09-26 14:45:07.306367 | 2018-12-04 16:34:16.563401 | 2018-12-04 16:34:16.563249 | 明月苑烧肉酒场 | 来自东京川地道的烧肉料理,特色酒饮,以及宾至如归的日式气氛,带给您非凡的餐饮体验。 | 日本菜 | 上海 | 上海 | 餐饮 | 8 | NULL | NULL | NULL | 1 | 0 | -1 | 2 |
| 5 | ee5c2a2bad9a4fdaa5940bfe5d6b9d5b | 2018-09-28 13:47:12.089623 | 2019-04-16 11:39:40.901282 | NULL | 测试尚浦领世店 | 0.00 | 上海 | 上海 | 杨浦区 | NULL | 杨浦区江湾城路99号6幢1层108A(江湾城路民府路路口) | 021-65197988 | 31.31665100 | 121.50998100 | 3 | | 21:00:00.000000 | 09:00:00.000000 | 0,1,2,3,4,5,6 | wtw6jj0be | NULL | {"share_buy": "https://forseti-cdn.wozaihui.com/shop_pic/1c922a65aa9f4bc29e0c939542d6f9bc.png", "share_join": "https://forseti-cdn.wozaihui.com/shop_pic/eb99484ff0104956ad9eb87b0eac851d.png"} | NULL | 0 | 119 | {"images": []} | -1 | 0 | 3 | 7cd93ba0c07945eabf8269ef9c03e4f8 | 2018-09-28 13:45:07.225361 | 2019-01-25 17:31:05.532020 | NULL | 测试专用·A Peace Of Cake | 纯进口原材料、注重口味、注重品质生活。 | 面包甜点 | 上海 | 上海 | 餐饮 | 30 | NULL | NULL | NULL | 1 | 0 | -1 | 2 |
| 6 | 4e260c1ebcd44cf38da099879c060359 | 2018-09-28 13:55:24.595439 | 2019-04-16 11:39:41.042096 | 2018-09-28 13:55:34.563386 | 田尚坊 | 0.00 | 上海 | 上海 | NULL | NULL | 钦州北路226号田尚坊商业中心地下一层B05(星巴克楼下) | 021-64688256,17317582638 | 31.18063600 | 121.41968700 | 1 | 下午13:30至17:00为午休时间,请您合理安排时间 | 23:30:00.000000 | 11:00:00.000000 | 0,1,2,3,4,5,6 | wtw36ur07 | NULL | {} | NULL | 0 | 2 | {"images": []} | -1 | 0 | 1 | 2a2f2e368fb145f199753d3124c575c6 | 2018-09-26 14:45:07.306367 | 2018-12-04 16:34:16.563401 | 2018-12-04 16:34:16.563249 | 明月苑烧肉酒场 | 来自东京川地道的烧肉料理,特色酒饮,以及宾至如归的日式气氛,带给您非凡的餐饮体验。 | 日本菜 | 上海 | 上海 | 餐饮 | 8 | NULL | NULL | NULL | 1 | 0 | -1 | 2 |
| 7 | 6c362ed2c5974ccbbd7d845e8516642c | 2018-09-29 10:55:52.824074 | 2018-09-29 10:55:52.824099 | 2018-09-29 10:55:21.804709 | 新世界店测试勿动 | 100.00 | 上海 | 上海 | 长宁区 | 虹桥 | 南京西路2-68号 | 13621947374 | 31.23479400 | 121.47364700 | 4 | | 23:59:59.999999 | 00:00:00.000000 | | | 22402dc88ed54ab9a77bd5f880a419a3 | {} | NULL | 0 | 26 | {"images": []} | -1 | 0 | 4 | 07bbef1053c543aab3cd653f3f8e8388 | 2018-09-29 10:55:21.811842 | 2019-04-16 11:26:13.854551 | 2018-09-29 10:55:21.804709 | 再惠茶餐厅1 | 再惠测试账号,别当真哦123 | 西餐 | 上海 | 上海 | 购物 | 35 | NULL | f2487260f09f44a0b8dc5a98572cfaa1 | NULL | 5 | 0 | -1 | 2 |
| 8 | 62c52cb637ff4634ab2cb7a439c0aebf | 2018-09-29 10:55:52.836646 | 2019-04-16 11:39:41.214035 | 2018-09-29 10:55:21.819887 | 星空影吧 | 0.00 | 上海 | 上海 | 徐汇区 | 万体馆 | 斜土路2601号T34D | 021-64873233 | 31.19444297 | 121.45048726 | 5 | | 23:59:59.999999 | 00:00:00.000000 | | | a0827180e28545ab9643426dbe90e924 | {} | NULL | 0 | 10 | {"images": []} | -1 | 0 | 5 | 43f201daa91d44a0ab6c92c37886262e | 2018-09-29 10:55:21.823775 | 2019-04-16 11:26:14.074152 | 2018-09-29 10:55:21.819887 | 星空影吧 | 给你足够的私人空间,享受不一样的视听盛宴 | | 上海 | 上海 | 餐饮 | 12394 | NULL | 90f528dd77314ad19d86d7f3b897f18b | NULL | 1 | 0 | -1 | 2 |
| 9 | 99a5c3f1d3114ec09820e0dd2ecc009f | 2018-09-29 10:55:52.849237 | 2018-09-29 10:55:52.849261 | 2018-09-29 10:55:21.832875 | 柠蕴泰厨 | 0.00 | 上海 | 上海 | 徐汇区 | | 徐汇区 天钥桥路580号星游城1楼-2楼、斜土路2626号 | 021-54198197 | 31.19160667 | 121.44924397 | 6 | | 23:59:59.999999 | 00:00:00.000000 | | | 45f6331ec63d48549c4db31ecffb35c9 | {} | NULL | 0 | 8 | {"images": []} | -1 | 0 | 6 | 34eca5960c1046cdbe49bc8508e354fc | 2018-09-29 10:55:21.836863 | 2019-04-16 11:26:14.261441 | 2018-09-29 10:55:21.832875 | 柠蕴泰厨 | 将泰菜做到上海第一,性价比最高,让大家想到泰菜就能想到这家餐厅是老板对这家店的理想。 | | 上海 | 上海 | 餐饮 | 37 | NULL | e6553f08fa024e89be493c70125fab96 | NULL | 1 | 0 | -1 | 2 |
| 10 | b7fdd16e004145b4ae4cdfd5dd357789 | 2018-09-29 10:55:52.861296 | 2019-04-16 11:39:41.418855 | 2018-09-29 10:55:21.844270 | 小神田烧肉 | 0.00 | 上海 | 上海 | 徐汇区 | 万体馆 | 上海市徐汇区南丹东路111号(近天钥桥路) | 021-54892817 | 31.19695686 | 121.45003700 | 7 | | 23:59:59.999999 | 00:00:00.000000 | | | e41cdc9a447842b1957114beb0bd2f2c | {} | NULL | 0 | 10 | {"images": []} | -1 | 0 | 7 | 66e4709ab3704d6cb5ec6b1b545a8743 | 2018-09-29 10:55:21.848089 | 2019-04-16 11:26:14.433225 | 2018-09-29 10:55:21.844270 | 小神田烧肉 | 小神田烧肉是一家地处徐家汇黄金地段的日式料理餐厅,亲民的价位,让您感受我们的真诚!是您和亲朋好友、同事恋人相聚一桌,饕餮朵颐的好地方! | | 上海 | 上海 | 餐饮 | 675 | NULL | 7dd404f143584441aa948dd5a01d2516 | NULL | 1 | 0 | -1 | 2 |
+----+----------------------------------+----------------------------+----------------------------+----------------------------+---------------------------+----------+----------+--------+-----------+--------------+----------------------------------------------------------------------------------------------------------+--------------------------+-------------+--------------+-------------+---------------------------------------------------------------+-----------------+-----------------+---------------+-----------+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+-----------------+-----------+----------------+-----------+-------------------+----+----------------------------------+----------------------------+----------------------------+----------------------------+------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+----------+--------+---------------+---------+---------------+----------------------------------+------------+-------------+-----------------+-----------+-----------+
*************************** 1. row ***************************
QUERY: SELECT *
FROM business_shop
INNER JOIN business_business ON (business_shop.business_id = business_business.id)
GROUP BY business_shop.id
ORDER BY NULL
LIMIT 10
TRACE: {
"steps": [
{
"join_preparation": {
"select#": 1,
"steps": [
{
"expanded_query": "/* select#1 */ select `business_shop`.`id` AS `id`,`business_shop`.`uid` AS `uid`,`business_shop`.`created_at` AS `created_at`,`business_shop`.`updated_at` AS `updated_at`,`business_shop`.`deactivated_at` AS `deactivated_at`,`business_shop`.`name` AS `name`,`business_shop`.`avg_cost` AS `avg_cost`,`business_shop`.`province` AS `province`,`business_shop`.`city` AS `city`,`business_shop`.`district` AS `district`,`business_shop`.`business_hub` AS `business_hub`,`business_shop`.`address` AS `address`,`business_shop`.`phone` AS `phone`,`business_shop`.`latitude` AS `latitude`,`business_shop`.`longitude` AS `longitude`,`business_shop`.`business_id` AS `business_id`,`business_shop`.`business_remark` AS `business_remark`,`business_shop`.`closing_time` AS `closing_time`,`business_shop`.`opening_time` AS `opening_time`,`business_shop`.`business_hour` AS `business_hour`,`business_shop`.`geo_code` AS `geo_code`,`business_shop`.`server_uid` AS `server_uid`,`business_shop`.`json_data` AS `json_data`,`business_shop`.`openshopid` AS `openshopid`,`business_shop`.`is_mark_offline` AS `is_mark_offline`,`business_shop`.`region_id` AS `region_id`,`business_shop`.`qualification` AS `qualification`,`business_shop`.`server_id` AS `server_id`,`business_shop`.`enable_membership` AS `enable_membership`,`business_business`.`id` AS `id`,`business_business`.`uid` AS `uid`,`business_business`.`created_at` AS `created_at`,`business_business`.`updated_at` AS `updated_at`,`business_business`.`deactivated_at` AS `deactivated_at`,`business_business`.`name` AS `name`,`business_business`.`description` AS `description`,`business_business`.`sub_category` AS `sub_category`,`business_business`.`province` AS `province`,`business_business`.`city` AS `city`,`business_business`.`main_category` AS `main_category`,`business_business`.`logo_id` AS `logo_id`,`business_business`.`main_video_id` AS `main_video_id`,`business_business`.`server_uid` AS `server_uid`,`business_business`.`openshopid` AS `openshopid`,`business_business`.`shops_count` AS `shops_count`,`business_business`.`is_mark_offline` AS `is_mark_offline`,`business_business`.`server_id` AS `server_id`,`business_business`.`region_id` AS `region_id` from (`business_shop` join `business_business` on((`business_shop`.`business_id` = `business_business`.`id`))) group by `business_shop`.`id` order by NULL limit 10"
},
{
"transformations_to_nested_joins": {
"transformations": [
"JOIN_condition_to_WHERE",
"parenthesis_removal"
],
"expanded_query": "/* select#1 */ select `business_shop`.`id` AS `id`,`business_shop`.`uid` AS `uid`,`business_shop`.`created_at` AS `created_at`,`business_shop`.`updated_at` AS `updated_at`,`business_shop`.`deactivated_at` AS `deactivated_at`,`business_shop`.`name` AS `name`,`business_shop`.`avg_cost` AS `avg_cost`,`business_shop`.`province` AS `province`,`business_shop`.`city` AS `city`,`business_shop`.`district` AS `district`,`business_shop`.`business_hub` AS `business_hub`,`business_shop`.`address` AS `address`,`business_shop`.`phone` AS `phone`,`business_shop`.`latitude` AS `latitude`,`business_shop`.`longitude` AS `longitude`,`business_shop`.`business_id` AS `business_id`,`business_shop`.`business_remark` AS `business_remark`,`business_shop`.`closing_time` AS `closing_time`,`business_shop`.`opening_time` AS `opening_time`,`business_shop`.`business_hour` AS `business_hour`,`business_shop`.`geo_code` AS `geo_code`,`business_shop`.`server_uid` AS `server_uid`,`business_shop`.`json_data` AS `json_data`,`business_shop`.`openshopid` AS `openshopid`,`business_shop`.`is_mark_offline` AS `is_mark_offline`,`business_shop`.`region_id` AS `region_id`,`business_shop`.`qualification` AS `qualification`,`business_shop`.`server_id` AS `server_id`,`business_shop`.`enable_membership` AS `enable_membership`,`business_business`.`id` AS `id`,`business_business`.`uid` AS `uid`,`business_business`.`created_at` AS `created_at`,`business_business`.`updated_at` AS `updated_at`,`business_business`.`deactivated_at` AS `deactivated_at`,`business_business`.`name` AS `name`,`business_business`.`description` AS `description`,`business_business`.`sub_category` AS `sub_category`,`business_business`.`province` AS `province`,`business_business`.`city` AS `city`,`business_business`.`main_category` AS `main_category`,`business_business`.`logo_id` AS `logo_id`,`business_business`.`main_video_id` AS `main_video_id`,`business_business`.`server_uid` AS `server_uid`,`business_business`.`openshopid` AS `openshopid`,`business_business`.`shops_count` AS `shops_count`,`business_business`.`is_mark_offline` AS `is_mark_offline`,`business_business`.`server_id` AS `server_id`,`business_business`.`region_id` AS `region_id` from `business_shop` join `business_business` where (`business_shop`.`business_id` = `business_business`.`id`) group by `business_shop`.`id` order by NULL limit 10"
}
}
]
}
},
{
"join_optimization": {
"select#": 1,
"steps": [
{
"condition_processing": {
"condition": "WHERE",
"original_condition": "(`business_shop`.`business_id` = `business_business`.`id`)",
"steps": [
{
"transformation": "equality_propagation",
"resulting_condition": "multiple equal(`business_shop`.`business_id`, `business_business`.`id`)"
},
{
"transformation": "constant_propagation",
"resulting_condition": "multiple equal(`business_shop`.`business_id`, `business_business`.`id`)"
},
{
"transformation": "trivial_condition_removal",
"resulting_condition": "multiple equal(`business_shop`.`business_id`, `business_business`.`id`)"
}
]
}
},
{
"substitute_generated_columns": {
}
},
{
"table_dependencies": [
{
"table": "`business_shop`",
"row_may_be_null": false,
"map_bit": 0,
"depends_on_map_bits": [
]
},
{
"table": "`business_business`",
"row_may_be_null": false,
"map_bit": 1,
"depends_on_map_bits": [
]
}
]
},
{
"ref_optimizer_key_uses": [
{
"table": "`business_shop`",
"field": "business_id",
"equals": "`business_business`.`id`",
"null_rejecting": false
},
{
"table": "`business_business`",
"field": "id",
"equals": "`business_shop`.`business_id`",
"null_rejecting": false
}
]
},
{
"rows_estimation": [
{
"table": "`business_shop`",
"const_keys_added": {
"keys": [
"PRIMARY",
"uid",
"business_shop_business_id_name_0136ca11_uniq",
"openshopid",
"business_shop_deactivated_at_8a673bec",
"idx_bs_g",
"business_shop_region_id_93d9c427_fk_core_region_id"
],
"cause": "group_by"
},
"range_analysis": {
"table_scan": {
"rows": 235202,
"cost": 33035
},
"potential_range_indexes": [
{
"index": "PRIMARY",
"usable": true,
"key_parts": [
"id"
]
},
{
"index": "uid",
"usable": true,
"key_parts": [
"uid"
]
},
{
"index": "business_shop_business_id_name_0136ca11_uniq",
"usable": true,
"key_parts": [
"business_id",
"name"
]
},
{
"index": "openshopid",
"usable": true,
"key_parts": [
"openshopid"
]
},
{
"index": "business_shop_deactivated_at_8a673bec",
"usable": true,
"key_parts": [
"deactivated_at",
"id"
]
},
{
"index": "idx_bs_g",
"usable": true,
"key_parts": [
"deactivated_at",
"geo_code",
"id"
]
},
{
"index": "business_shop_region_id_93d9c427_fk_core_region_id",
"usable": true,
"key_parts": [
"region_id",
"id"
]
}
],
"setup_range_conditions": [
],
"group_index_range": {
"chosen": false,
"cause": "not_single_table"
}
}
},
{
"table": "`business_business`",
"table_scan": {
"rows": 169004,
"cost": 505
}
}
]
},
{
"considered_execution_plans": [
{
"plan_prefix": [
],
"table": "`business_business`",
"best_access_path": {
"considered_access_paths": [
{
"access_type": "ref",
"index": "PRIMARY",
"usable": false,
"chosen": false
},
{
"rows_to_scan": 169004,
"filtering_effect": [
],
"final_filtering_effect": 1,
"access_type": "scan",
"resulting_rows": 169004,
"cost": 17405,
"chosen": true
}
]
},
"condition_filtering_pct": 100,
"rows_for_plan": 169004,
"cost_for_plan": 17405,
"rest_of_plan": [
{
"plan_prefix": [
"`business_business`"
],
"table": "`business_shop`",
"best_access_path": {
"considered_access_paths": [
{
"access_type": "ref",
"index": "business_shop_business_id_name_0136ca11_uniq",
"rows": 1.2955,
"cost": 240830,
"chosen": true
},
{
"rows_to_scan": 235202,
"filtering_effect": [
],
"final_filtering_effect": 1,
"access_type": "scan",
"using_join_cache": true,
"buffers_needed": 1583,
"resulting_rows": 235202,
"cost": 3.99e9,
"chosen": false
}
]
},
"condition_filtering_pct": 100,
"rows_for_plan": 218936,
"cost_for_plan": 258235,
"chosen": true
}
]
},
{
"plan_prefix": [
],
"table": "`business_shop`",
"best_access_path": {
"considered_access_paths": [
{
"access_type": "ref",
"index": "business_shop_business_id_name_0136ca11_uniq",
"usable": false,
"chosen": false
},
{
"rows_to_scan": 235202,
"filtering_effect": [
],
"final_filtering_effect": 1,
"access_type": "scan",
"resulting_rows": 235202,
"cost": 33033,
"chosen": true
}
]
},
"condition_filtering_pct": 100,
"rows_for_plan": 235202,
"cost_for_plan": 33033,
"rest_of_plan": [
{
"plan_prefix": [
"`business_shop`"
],
"table": "`business_business`",
"best_access_path": {
"considered_access_paths": [
{
"access_type": "eq_ref",
"index": "PRIMARY",
"rows": 1,
"cost": 82321,
"chosen": true,
"cause": "clustered_pk_chosen_by_heuristics"
},
{
"rows_to_scan": 169004,
"filtering_effect": [
],
"final_filtering_effect": 1,
"access_type": "scan",
"using_join_cache": true,
"buffers_needed": 8549,
"resulting_rows": 169004,
"cost": 3.98e9,
"chosen": false
}
]
},
"condition_filtering_pct": 100,
"rows_for_plan": 235202,
"cost_for_plan": 115354,
"chosen": true
}
]
}
]
},
{
"attaching_conditions_to_tables": {
"original_condition": "(`business_business`.`id` = `business_shop`.`business_id`)",
"attached_conditions_computation": [
],
"attached_conditions_summary": [
{
"table": "`business_shop`",
"attached": null
},
{
"table": "`business_business`",
"attached": null
}
]
}
},
{
"optimizing_distinct_group_by_order_by": {
"simplifying_order_by": {
"original_clause": "NULL",
"items": [
{
"item": "NULL",
"uses_only_constant_tables": true
}
],
"resulting_clause_is_simple": true,
"resulting_clause": ""
},
"simplifying_group_by": {
"original_clause": "`business_shop`.`id`",
"items": [
{
"item": "`business_shop`.`id`"
}
],
"resulting_clause_is_simple": true,
"resulting_clause": "`business_shop`.`id`"
}
}
},
{
"reconsidering_access_paths_for_index_ordering": {
"clause": "GROUP BY",
"index_order_summary": {
"table": "`business_shop`",
"index_provides_order": true,
"order_direction": "asc",
"index": "PRIMARY",
"plan_changed": true,
"access_type": "index"
}
}
},
{
"refine_plan": [
{
"table": "`business_shop`"
},
{
"table": "`business_business`"
}
]
},
{
"considering_tmp_tables": [
]
}
]
}
},
{
"join_execution": {
"select#": 1,
"steps": [
]
}
}
]
}
MISSING_BYTES_BEYOND_MAX_MEM_SIZE: 0
INSUFFICIENT_PRIVILEGES: 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment