Query time 0.01689
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "62.38"
},
"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": 69,
"rows_produced_per_join": 69,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "7.18",
"eval_cost": "6.90",
"prefix_cost": "14.08",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (98493,98494,98495,98503,98504,98505,98506,98507,98508,98722,98723,98724,98725,98726,98727,98728,98729,98730,98731,98732,98733,98734,98735,98736,98737,98750,98751,98752,98753,98754))"
}
},
{
"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": 69,
"filtered": "100.00",
"cost_info": {
"read_cost": "17.25",
"eval_cost": "6.90",
"prefix_cost": "38.23",
"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": [
"nuie_scalesta_net.cscart_products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 3,
"filtered": "5.00",
"cost_info": {
"read_cost": "17.25",
"eval_cost": "0.35",
"prefix_cost": "62.38",
"data_read_per_join": "9K"
},
"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')))"
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 98493 |
7338,7219M,7313 |
|
| 98494 |
7338,7219M,7313 |
|
| 98495 |
7219M,7338,7313 |
|
| 98503 |
7219M,7338,7313 |
|
| 98504 |
7219M,7338,7313 |
|
| 98505 |
7219M,7313,7338 |
|
| 98506 |
7313,7219M,7338 |
|
| 98507 |
7219M,7313,7338 |
|
| 98508 |
7219M,7313,7338 |
|
| 98722 |
7217M,7337 |
|
| 98723 |
7217M,7337 |
|
| 98724 |
7217M,7337 |
|
| 98725 |
7217M,7337 |
|
| 98726 |
7217M,7337 |
|
| 98727 |
7217M,7337 |
|
| 98728 |
7337,7217M |
|
| 98729 |
7337,7217M |
|
| 98730 |
7337,7217M |
|
| 98731 |
7337,7217M |
|
| 98732 |
7217M,7337 |
|
| 98733 |
7337,7217M |
|
| 98734 |
7337,7217M |
|
| 98735 |
7337,7217M |
|
| 98736 |
7217M,7337 |
|
| 98737 |
7217M,7337 |
|
| 98750 |
7217M,7337 |
|
| 98751 |
7217M,7337 |
|
| 98752 |
7217M,7337 |
|
| 98753 |
7337,7217M |
|
| 98754 |
7337,7217M |
|