Query time 0.00100
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "109.29"
},
"grouping_operation": {
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "cscart_products_categories",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"link_type",
"pt"
],
"key": "pt",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"rows_examined_per_scan": 192,
"rows_produced_per_join": 192,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "19.53",
"eval_cost": "19.20",
"prefix_cost": "38.73",
"data_read_per_join": "3K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (93283,93285,93287,93289,93291,94452,94453,94454,94455,94456,94458,94459,94460,94461,94462,94751,94752,94753,94754,94755,94756,94757,94758,94762,94764,95565,95567,95568,95570,95572,95573,95576,95577,95582,95583,95584,95585,95586,95639,95654,95934,95937,95941,96206,96207,96208,96601,96604))"
}
},
{
"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": [
"nuie_scalesta_net.cscart_products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 9,
"filtered": "5.00",
"cost_info": {
"read_cost": "48.00",
"eval_cost": "0.96",
"prefix_cost": "105.93",
"data_read_per_join": "25K"
},
"used_columns": [
"category_id",
"usergroup_ids",
"status",
"storefront_id"
],
"attached_condition": "((`nuie_scalesta_net`.`cscart_categories`.`storefront_id` in (0,1)) and ((`nuie_scalesta_net`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`nuie_scalesta_net`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`nuie_scalesta_net`.`cscart_categories`.`usergroup_ids`))) and (`nuie_scalesta_net`.`cscart_categories`.`status` in ('A','H')))"
}
},
{
"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",
"nuie_scalesta_net.cscart_products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 9,
"filtered": "100.00",
"cost_info": {
"read_cost": "2.40",
"eval_cost": "0.96",
"prefix_cost": "109.29",
"data_read_per_join": "153"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 93283 |
7341,7342,7343,7157M |
0 |
| 93285 |
7341,7342,7343,7157M |
0 |
| 93287 |
7341,7342,7343,7157M |
0 |
| 93289 |
7341,7342,7343,7157M |
0 |
| 93291 |
7341,7342,7343,7157M |
0 |
| 94452 |
7341,7342,7343,7157M |
0 |
| 94453 |
7341,7342,7343,7157M |
0 |
| 94454 |
7341,7342,7343,7157M |
0 |
| 94455 |
7341,7342,7343,7157M |
0 |
| 94456 |
7341,7342,7343,7157M |
0 |
| 94458 |
7341,7342,7343,7157M |
0 |
| 94459 |
7341,7342,7343,7157M |
0 |
| 94460 |
7341,7342,7343,7157M |
0 |
| 94461 |
7341,7342,7343,7157M |
0 |
| 94462 |
7341,7342,7343,7157M |
0 |
| 94751 |
7341,7342,7343,7157M |
0 |
| 94752 |
7341,7342,7343,7157M |
0 |
| 94753 |
7341,7342,7343,7157M |
0 |
| 94754 |
7341,7342,7343,7157M |
0 |
| 94755 |
7341,7342,7343,7157M |
0 |
| 94756 |
7341,7342,7343,7157M |
0 |
| 94757 |
7341,7342,7343,7157M |
0 |
| 94758 |
7341,7342,7343,7157M |
0 |
| 94762 |
7341,7342,7343,7157M |
0 |
| 94764 |
7341,7342,7343,7157M |
0 |
| 95565 |
7341,7342,7343,7157M |
0 |
| 95567 |
7341,7342,7343,7157M |
0 |
| 95568 |
7341,7342,7343,7157M |
0 |
| 95570 |
7341,7342,7343,7157M |
0 |
| 95572 |
7341,7342,7343,7157M |
0 |
| 95573 |
7341,7342,7343,7157M |
0 |
| 95576 |
7341,7342,7343,7157M |
0 |
| 95577 |
7341,7342,7343,7157M |
0 |
| 95582 |
7341,7342,7343,7157M |
0 |
| 95583 |
7341,7342,7343,7157M |
0 |
| 95584 |
7341,7342,7343,7157M |
0 |
| 95585 |
7341,7342,7343,7157M |
0 |
| 95586 |
7341,7342,7343,7157M |
0 |
| 95639 |
7341,7342,7343,7157M |
0 |
| 95654 |
7341,7342,7343,7157M |
0 |
| 95934 |
7341,7342,7343,7157M |
0 |
| 95937 |
7341,7342,7343,7157M |
0 |
| 95941 |
7341,7342,7343,7157M |
0 |
| 96206 |
7341,7342,7343,7157M |
0 |
| 96207 |
7341,7342,7343,7157M |
0 |
| 96208 |
7341,7342,7343,7157M |
0 |
| 96601 |
7341,7342,7343,7157M |
0 |
| 96604 |
7341,7342,7343,7157M |
0 |