Query time 0.00159
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "53.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": 59,
"rows_produced_per_join": 59,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "6.18",
"eval_cost": "5.90",
"prefix_cost": "12.08",
"data_read_per_join": "944"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (100442,100443,100444,100445,100446,100447,100448,100449,100450,100451,100452,100453,100454,100455,100456,100457,100458,100459,100460,100461,100462,100463,100464,100465,100466,100467,100468,100469,100470,100471,100472,100473,100474,100475,100476,100923,100924,100925,100926,100927,100928,100929,100930,100931,100932,100933,100934,100935))"
}
},
{
"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": 59,
"filtered": "100.00",
"cost_info": {
"read_cost": "14.75",
"eval_cost": "5.90",
"prefix_cost": "32.73",
"data_read_per_join": "944"
},
"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": 2,
"filtered": "5.00",
"cost_info": {
"read_cost": "14.75",
"eval_cost": "0.30",
"prefix_cost": "53.38",
"data_read_per_join": "7K"
},
"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 |
| 100442 |
7177M |
|
| 100443 |
7177M |
|
| 100444 |
7177M |
|
| 100445 |
7176M |
|
| 100446 |
7176M |
|
| 100447 |
7176M |
|
| 100448 |
7179M |
|
| 100449 |
7179M |
|
| 100450 |
7174M |
|
| 100451 |
7174M |
|
| 100452 |
7174M |
|
| 100453 |
7174M |
|
| 100454 |
7174M |
|
| 100455 |
7174M |
|
| 100456 |
7174M |
|
| 100457 |
7174M |
|
| 100458 |
7173M |
|
| 100459 |
7173M |
|
| 100460 |
7173M |
|
| 100461 |
7176M |
|
| 100462 |
7176M |
|
| 100463 |
7176M |
|
| 100464 |
7174M |
|
| 100465 |
7174M |
|
| 100466 |
7176M |
|
| 100467 |
7174M |
|
| 100468 |
7174M |
|
| 100469 |
7176M |
|
| 100470 |
7174M |
|
| 100471 |
7174M |
|
| 100472 |
7173M |
|
| 100473 |
7173M |
|
| 100474 |
7173M |
|
| 100475 |
7176M |
|
| 100476 |
7176M |
|
| 100923 |
7319,7193M |
|
| 100924 |
7319,7193M |
|
| 100925 |
7319,7193M |
|
| 100926 |
7319,7193M |
|
| 100927 |
7319,7193M |
|
| 100928 |
7168M |
|
| 100929 |
7168M |
|
| 100930 |
7319,7193M |
|
| 100931 |
7319,7193M |
|
| 100932 |
7319,7193M |
|
| 100933 |
7319,7193M |
|
| 100934 |
7319,7193M |
|
| 100935 |
7319,7193M |
|