Query time 0.01491
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "79.49"
},
"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": 88,
"rows_produced_per_join": 88,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "9.09",
"eval_cost": "8.80",
"prefix_cost": "17.89",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (93282,93284,93286,93288,93290,93294,93338,93339,94428,94750,94759,94760,94761,94763,94765,94816,94950,94951,94956,94957,95566,95569,95571,95574,95575,95578,95579,95580,95581,95587))"
}
},
{
"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": 88,
"filtered": "100.00",
"cost_info": {
"read_cost": "22.00",
"eval_cost": "8.80",
"prefix_cost": "48.69",
"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": 4,
"filtered": "5.00",
"cost_info": {
"read_cost": "22.00",
"eval_cost": "0.44",
"prefix_cost": "79.49",
"data_read_per_join": "11K"
},
"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 |
| 93282 |
7338,7219M,7313 |
|
| 93284 |
7219M,7338,7313 |
|
| 93286 |
7219M,7338,7313 |
|
| 93288 |
7338,7219M,7313 |
|
| 93290 |
7338,7313,7219M |
|
| 93294 |
7338,7219M,7313 |
|
| 93338 |
7219M,7338,7313 |
|
| 93339 |
7313,7219M,7338 |
|
| 94428 |
7338,7219M,7313 |
|
| 94750 |
7338,7219M,7313 |
|
| 94759 |
7338,7313,7219M |
|
| 94760 |
7338,7313,7219M |
|
| 94761 |
7338,7313,7219M |
|
| 94763 |
7219M,7338,7313 |
|
| 94765 |
7338,7219M,7313 |
|
| 94816 |
7338,7313,7219M |
|
| 94950 |
7338,7313,7219M |
|
| 94951 |
7219M,7313,7338 |
|
| 94956 |
7339,7329M |
|
| 94957 |
7339,7329M |
|
| 95566 |
7219M,7338,7313 |
|
| 95569 |
7219M,7338,7313 |
|
| 95571 |
7219M,7313,7338 |
|
| 95574 |
7338,7219M,7313 |
|
| 95575 |
7219M,7313,7338 |
|
| 95578 |
7313,7338,7219M |
|
| 95579 |
7219M,7338,7313 |
|
| 95580 |
7313,7219M,7338 |
|
| 95581 |
7219M,7313,7338 |
|
| 95587 |
7219M,7313,7338 |
|