Query time 0.00891
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "133.50"
},
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": true,
"cost_info": {
"sort_cost": "8.71"
},
"nested_loop": [
{
"table": {
"table_name": "cscart_categories",
"access_type": "ALL",
"possible_keys": [
"PRIMARY",
"c_status",
"p_category_id"
],
"rows_examined_per_scan": 208,
"rows_produced_per_join": 8,
"filtered": "4.00",
"cost_info": {
"read_cost": "20.72",
"eval_cost": "0.83",
"prefix_cost": "21.55",
"data_read_per_join": "21K"
},
"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": "cscart_products_categories",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"link_type",
"pt"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"nuie_scalesta_net.cscart_categories.category_id"
],
"rows_examined_per_scan": 117,
"rows_produced_per_join": 8,
"filtered": "0.89",
"cost_info": {
"read_cost": "2.33",
"eval_cost": "0.87",
"prefix_cost": "121.75",
"data_read_per_join": "139"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (88740,91897,91898,91899,92341,92343,92344,85643,88925,88926,88927,91470,92186,92187,92188,92189,92190,92441,82561,85642,86249,88070,88394,82369,85582,86901,90023,90039,90055,90328,90332,90335,90336,90343,90344,92488,91840,91841,91842,91843,91845,91846,91847,82375,87581,87596,87611,88150,88152,88792,90268,91884,92476,92477,92478,92479,92480,92481,92482,85586,82357,86356,86357,87962,88079,88084,86253,89590,86891,87657,87671,87678,87685,87706,87719,87733,88696,88743,87787,90327,87994,91868,90264,91849,91850,91851,91852,91853,91854,91855,91857,91858,91859,91860,91861,91862))"
}
},
{
"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": 8,
"filtered": "100.00",
"cost_info": {
"read_cost": "2.18",
"eval_cost": "0.87",
"prefix_cost": "124.80",
"data_read_per_join": "139"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 82357 |
7148,7149,7152M |
0 |
| 82369 |
7161M,7303 |
|
| 82375 |
7151M,7301 |
|
| 82561 |
7167M,7183,7283 |
|
| 85582 |
7157M,7341,7342,7343 |
|
| 85586 |
7148,7158,7159M |
0 |
| 85642 |
7148,7156,7157M |
0 |
| 85643 |
7148,7158M |
0 |
| 86249 |
7148,7163,7164M |
0 |
| 86253 |
7148,7163,7164M |
0 |
| 86356 |
7148,7163,7164M |
0 |
| 86357 |
7148,7163,7164M |
0 |
| 86891 |
7157M,7341,7342,7343 |
|
| 86901 |
7148,7156,7157M |
0 |
| 87581 |
7194M |
|
| 87596 |
7194M |
|
| 87611 |
7194M |
|
| 87657 |
7194M |
|
| 87671 |
7194M |
|
| 87678 |
7194M |
|
| 87685 |
7194M |
|
| 87706 |
7194M |
|
| 87719 |
7194M |
|
| 87733 |
7194M |
|
| 87787 |
7148,7207M |
0 |
| 87962 |
7263M |
|
| 87994 |
7263M |
|
| 88070 |
7263M |
|
| 88079 |
7263M |
|
| 88084 |
7263M |
|
| 88150 |
7194M |
|
| 88152 |
7194M |
|
| 88394 |
7263M |
|
| 88696 |
7194M |
|
| 88740 |
7194M |
|
| 88743 |
7194M |
|
| 88792 |
7194M |
|
| 88925 |
7225M,7226 |
|
| 88926 |
7225M,7226 |
|
| 88927 |
7225M,7226 |
|
| 89590 |
7151M,7301 |
|
| 90023 |
7194M |
|
| 90039 |
7194M |
|
| 90055 |
7194M |
|
| 90264 |
7167M,7183,7283 |
|
| 90268 |
7167M,7183,7283 |
|
| 90327 |
7247M,7265 |
|
| 90328 |
7247M,7265 |
|
| 90332 |
7247M,7265 |
|
| 90335 |
7247M,7265 |
|
| 90336 |
7247M,7265 |
|
| 90343 |
7247M,7265 |
|
| 90344 |
7247M,7265 |
|
| 91470 |
7225M,7226 |
|
| 91840 |
7148M,7156,7157 |
0 |
| 91841 |
7148M,7156,7157 |
0 |
| 91842 |
7148M,7156,7157 |
0 |
| 91843 |
7148M,7156,7157 |
0 |
| 91845 |
7148M,7156,7157 |
0 |
| 91846 |
7148M,7156,7157 |
0 |
| 91847 |
7148M,7156,7157 |
0 |
| 91849 |
7148M,7156,7157 |
0 |
| 91850 |
7148M,7156,7157 |
0 |
| 91851 |
7148M,7156,7157 |
0 |
| 91852 |
7148M,7156,7157 |
0 |
| 91853 |
7148M,7156,7157 |
0 |
| 91854 |
7148M,7156,7157 |
0 |
| 91855 |
7148M,7156,7157 |
0 |
| 91857 |
7148M,7156,7157 |
0 |
| 91858 |
7148M,7156,7157 |
0 |
| 91859 |
7148M,7156,7157 |
0 |
| 91860 |
7148M,7156,7157 |
0 |
| 91861 |
7148M,7156,7157 |
0 |
| 91862 |
7148M,7156,7157 |
0 |
| 91868 |
7157M,7341,7342,7343 |
|
| 91884 |
7225M,7226 |
|
| 91897 |
7225M,7226 |
|
| 91898 |
7225M,7226 |
|
| 91899 |
7225M,7226 |
|
| 92186 |
7157M,7341,7342,7343 |
|
| 92187 |
7157M,7341,7342,7343 |
|
| 92188 |
7157M,7341,7342,7343 |
|
| 92189 |
7157M,7341,7342,7343 |
|
| 92190 |
7157M,7341,7342,7343 |
|
| 92341 |
7225M,7226 |
|
| 92343 |
7225M,7226 |
|
| 92344 |
7225M,7226 |
|
| 92441 |
7157M,7341,7342,7343 |
|
| 92476 |
7219M,7313,7338 |
|
| 92477 |
7219M,7313,7338 |
|
| 92478 |
7219M,7313,7338 |
|
| 92479 |
7219M,7313,7338 |
|
| 92480 |
7219M,7313,7338 |
|
| 92481 |
7219M,7313,7338 |
|
| 92482 |
7219M,7313,7338 |
|
| 92488 |
7219M,7313,7338 |
|