Query time 0.00217
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "281.15"
},
"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": 100,
"rows_produced_per_join": 100,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "21.15",
"eval_cost": "20.00",
"prefix_cost": "41.15",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`webmarco`.`cscart_products_categories`.`product_id` in (431422,430983,431076,431175,430957,430965,431311,431434,430659,430642,430954,431105,431166,431260,431380,431002,431004,431409,431480,430963,430964,431287,431304,431346,431458,430781,430814,431015,431071,430754,430759,430798,430966,431324,431217,431362,431452,430669,430944,431079,431408,431453,431481,430750,431188,431273,431352,431407,430700,430727,431222,431394,430705,431001,430938,430978,430985,431208,430699,431009,431057,431241,431335,431447,430757,430942,430752,430773,430973,431210,431383,431488,431502,430719,431017,431292,431427,431236,430693,431040,431235,431330,430630,430943,431227,431263,431466,430632,430929,431482,430955,430971,431018,431069,431364,431415,431361,431378,431281,431302))"
}
},
{
"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",
"webmarco.cscart_products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 100,
"filtered": "100.00",
"cost_info": {
"read_cost": "100.00",
"eval_cost": "20.00",
"prefix_cost": "161.15",
"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": [
"webmarco.cscart_products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 5,
"filtered": "5.00",
"cost_info": {
"read_cost": "100.00",
"eval_cost": "1.00",
"prefix_cost": "281.15",
"data_read_per_join": "29K"
},
"used_columns": [
"category_id",
"usergroup_ids",
"status",
"storefront_id"
],
"attached_condition": "((`webmarco`.`cscart_categories`.`storefront_id` in (0,1)) and ((`webmarco`.`cscart_categories`.`usergroup_ids` = '') or find_in_set(0,`webmarco`.`cscart_categories`.`usergroup_ids`) or find_in_set(1,`webmarco`.`cscart_categories`.`usergroup_ids`)) and (`webmarco`.`cscart_categories`.`status` in ('A','H')))"
}
}
]
}
}
}
Result
product_id |
category_ids |
position |
430630 |
2601M |
|
430632 |
2601M |
|
430642 |
2601M |
|
430659 |
2601M |
|
430669 |
2601M |
|
430693 |
2601M |
|
430699 |
2601M |
|
430700 |
2601M |
|
430705 |
2601M |
|
430719 |
2601M |
|
430727 |
2601M |
|
430750 |
2601M |
|
430752 |
2601M |
|
430754 |
2601M |
|
430757 |
2601M |
|
430759 |
2601M |
|
430773 |
2601M |
|
430781 |
2601M |
|
430798 |
2601M |
|
430814 |
2601M |
|
430929 |
2601M |
|
430938 |
2601M |
|
430942 |
2601M |
|
430943 |
2601M |
|
430944 |
2601M |
|
430954 |
2601M |
|
430955 |
2601M |
|
430957 |
2601M |
|
430963 |
2601M |
|
430964 |
2601M |
|
430965 |
2601M |
|
430966 |
2601M |
|
430971 |
2601M |
|
430973 |
2601M |
|
430978 |
2601M |
|
430983 |
2601M |
|
430985 |
2601M |
|
431001 |
2601M |
|
431002 |
2601M |
|
431004 |
2601M |
|
431009 |
2601M |
|
431015 |
2601M |
|
431017 |
2601M |
|
431018 |
2601M |
|
431040 |
2601M |
|
431057 |
2601M |
|
431069 |
2601M |
|
431071 |
2601M |
|
431076 |
2601M |
|
431079 |
2601M |
|
431105 |
2601M |
|
431166 |
2601M |
|
431175 |
2601M |
|
431188 |
2601M |
|
431208 |
2601M |
|
431210 |
2601M |
|
431217 |
2601M |
|
431222 |
2601M |
|
431227 |
2601M |
|
431235 |
2601M |
|
431236 |
2601M |
|
431241 |
2601M |
|
431260 |
2601M |
|
431263 |
2601M |
|
431273 |
2601M |
|
431281 |
2601M |
|
431287 |
2601M |
|
431292 |
2601M |
|
431302 |
2601M |
|
431304 |
2601M |
|
431311 |
2601M |
|
431324 |
2601M |
|
431330 |
2601M |
|
431335 |
2601M |
|
431346 |
2601M |
|
431352 |
2601M |
|
431361 |
2601M |
|
431362 |
2601M |
|
431364 |
2601M |
|
431378 |
2601M |
|
431380 |
2601M |
|
431383 |
2601M |
|
431394 |
2601M |
|
431407 |
2601M |
|
431408 |
2601M |
|
431409 |
2601M |
|
431415 |
2601M |
|
431422 |
2601M |
|
431427 |
2601M |
|
431434 |
2601M |
|
431447 |
2601M |
|
431452 |
2601M |
|
431453 |
2601M |
|
431458 |
2601M |
|
431466 |
2601M |
|
431480 |
2601M |
|
431481 |
2601M |
|
431482 |
2601M |
|
431488 |
2601M |
|
431502 |
2601M |
|