Query time 0.00077
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "41.68"
},
"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": 46,
"rows_produced_per_join": 46,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "4.88",
"eval_cost": "4.60",
"prefix_cost": "9.48",
"data_read_per_join": "736"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (90031,87850,88096,87860,87884,87886,87862,88315,91431,87829,87842,87848,87858,88314,87863,87865,87827,87840,87833,87846,87838,88308,88313,88320,88322,87856,87836,87854,87834,87852))"
}
},
{
"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": 46,
"filtered": "100.00",
"cost_info": {
"read_cost": "11.50",
"eval_cost": "4.60",
"prefix_cost": "25.58",
"data_read_per_join": "736"
},
"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": "11.50",
"eval_cost": "0.23",
"prefix_cost": "41.68",
"data_read_per_join": "6K"
},
"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 |
| 87827 |
7252M |
|
| 87829 |
7252M |
|
| 87833 |
7331,7253M |
|
| 87834 |
7331,7253M |
|
| 87836 |
7330,7285M |
|
| 87838 |
7331,7253M |
|
| 87840 |
7331,7253M |
|
| 87842 |
7331,7253M |
|
| 87846 |
7252M |
|
| 87848 |
7252M |
|
| 87850 |
7252M |
|
| 87852 |
7331,7253M |
|
| 87854 |
7331,7253M |
|
| 87856 |
7331,7253M |
|
| 87858 |
7331,7253M |
|
| 87860 |
7331,7253M |
|
| 87862 |
7331,7253M |
|
| 87863 |
7331,7253M |
|
| 87865 |
7252M |
|
| 87884 |
7195,7196M |
0 |
| 87886 |
7195,7196M |
0 |
| 88096 |
7331,7253M |
|
| 88308 |
7222M |
|
| 88313 |
7222M |
|
| 88314 |
7222M |
|
| 88315 |
7222M |
|
| 88320 |
7222M |
|
| 88322 |
7222M |
|
| 90031 |
7287M |
|
| 91431 |
7222M |
|