Query time 0.00187
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "122.91"
},
"grouping_operation": {
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "cscart_products_categories",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "pt",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"rows_examined_per_scan": 96,
"rows_produced_per_join": 96,
"filtered": "100.00",
"index_condition": "(`cscartdb`.`cscart_products_categories`.`product_id` in (62664,38291,62098,38885,37523,37795,37811,38886,56522,61792,62039,37805,37815,37817,38672,56523,64452,62155,11278,38884,11273,11301,37793,37798,37810,56510,60470,67416,11282,37803,37806,37808,37812,37813,37814,37819,37824,56518,60469,62071,62082,62063,62079,11286,37797,37800,37801,37816,56516,56521))",
"cost_info": {
"read_cost": "46.11",
"eval_cost": "9.60",
"prefix_cost": "55.71",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
]
}
},
{
"table": {
"table_name": "product_position_source",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id",
"product_id"
],
"key_length": "6",
"ref": [
"const",
"cscartdb.cscart_products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 96,
"filtered": "100.00",
"cost_info": {
"read_cost": "24.00",
"eval_cost": "9.60",
"prefix_cost": "89.31",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
},
{
"table": {
"table_name": "cscart_categories",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"c_status",
"p_category_id"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"cscartdb.cscart_products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 4,
"filtered": "5.00",
"cost_info": {
"read_cost": "24.00",
"eval_cost": "0.48",
"prefix_cost": "122.91",
"data_read_per_join": "16K"
},
"used_columns": [
"category_id",
"storefront_id",
"usergroup_ids",
"status"
],
"attached_condition": "((`cscartdb`.`cscart_categories`.`storefront_id` in (0,1)) and ((`cscartdb`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`cscartdb`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`cscartdb`.`cscart_categories`.`usergroup_ids`))) and (`cscartdb`.`cscart_categories`.`status` in ('A','H')))"
}
}
]
}
}
}
Result
product_id |
category_ids |
position |
11273 |
451,576M |
|
11278 |
17,576M |
0 |
11282 |
451,576M |
|
11286 |
451,576M |
|
11301 |
451,576M |
|
37523 |
620,576M |
|
37793 |
1103,576M |
|
37795 |
1105,576M |
|
37797 |
1105,576M |
|
37798 |
1105,576M |
|
37800 |
1104,576M |
|
37801 |
1104,576M |
|
37803 |
1104,576M |
|
37805 |
1104,576M |
|
37806 |
1105,576M |
|
37808 |
1105,576M |
|
37810 |
1105,576M |
|
37811 |
1105,576M |
|
37812 |
1105,576M |
|
37813 |
1103,576M |
|
37814 |
1103,576M |
|
37815 |
1103,576M |
|
37816 |
1103,576M |
|
37817 |
1105,576M |
|
37819 |
1105,576M |
|
37824 |
1105,576M |
|
38291 |
1131,576M |
|
38672 |
1131,576M |
|
38884 |
1118,576M |
|
38885 |
1118,576M |
|
38886 |
1118,576M |
|
56510 |
1335,576M |
|
56516 |
1335,576M |
|
56518 |
1337,576M |
|
56521 |
1335,576M |
|
56522 |
1337,576M |
|
56523 |
1337,576M |
|
60469 |
1376,576M |
|
60470 |
1376,576M |
|
61792 |
1365,576M |
|
62039 |
1408,577M |
|
62063 |
1408,577M |
|
62071 |
1408,577M |
|
62079 |
1408,577M |
|
62082 |
1408,577M |
|
62098 |
1408,577M |
|
62155 |
1408,577M |
|
62664 |
451,576M |
|
64452 |
1440,17M |
0 |
67416 |
1480,577M |
|