Query time 0.00223
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 (431132,339796,391798,339457,265042,339477,339541,431162,339700,339811,431202,339489,392172,431099,431128,339458,339623,339469,431155,430639,339453,339797,339798,339606,392167,431141,339699,339643,431130,431168,339482,339685,431153,431154,339730,431096,431137,339731,392175,339463,381703,339709,430637,431125,431124,339478,381725,339460,430911,339468,431094,431146,430640,431134,339467,430745,431048,431187,339753,431033,339810,339808,339696,430767,339805,431067,339757,339787,339701,339806,430697,431191,339794,431090,431117,339464,431065,431104,431107,431157,431116,381701,392166,381687,431204,339452,431196,431084,339752,339750,339695,339814,430655,430744,430850,431203,431160,431176,431100,339707))"
}
},
{
"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 |
265042 |
1907M |
|
339452 |
9940M |
|
339453 |
9940M |
|
339457 |
9940M |
|
339458 |
9940M |
|
339460 |
9940M |
|
339463 |
9940M |
|
339464 |
9940M |
|
339467 |
9940M |
|
339468 |
9940M |
|
339469 |
9940M |
|
339477 |
9940M |
|
339478 |
9940M |
|
339482 |
9940M |
|
339489 |
9940M |
|
339541 |
9940M |
|
339606 |
395M |
|
339623 |
395M |
|
339643 |
395M |
|
339685 |
9940M |
|
339695 |
395M |
|
339696 |
395M |
|
339699 |
9940M |
|
339700 |
9940M |
|
339701 |
9940M |
|
339707 |
395M |
|
339709 |
9940M |
|
339730 |
9940M |
|
339731 |
9940M |
|
339750 |
395M |
|
339752 |
395M |
|
339753 |
395M |
|
339757 |
395M |
|
339787 |
9943M |
|
339794 |
9943M |
|
339796 |
9943M |
|
339797 |
9943M |
|
339798 |
9943M |
|
339805 |
9943M |
|
339806 |
9940M |
|
339808 |
9940M |
|
339810 |
9940M |
|
339811 |
9940M |
|
339814 |
395M |
|
381687 |
10409M |
|
381701 |
10410M |
|
381703 |
10410M |
|
381725 |
2599M |
|
391798 |
266M |
0 |
392166 |
2577M |
|
392167 |
2577M |
|
392172 |
2577M |
|
392175 |
2577M |
|
430637 |
2601M |
|
430639 |
2601M |
|
430640 |
2601M |
|
430655 |
2601M |
|
430697 |
2601M |
|
430744 |
2601M |
|
430745 |
2601M |
|
430767 |
2601M |
|
430850 |
2601M |
|
430911 |
2601M |
|
431033 |
2601M |
|
431048 |
2601M |
|
431065 |
2601M |
|
431067 |
2601M |
|
431084 |
2601M |
|
431090 |
2601M |
|
431094 |
2601M |
|
431096 |
2601M |
|
431099 |
2601M |
|
431100 |
2601M |
|
431104 |
2601M |
|
431107 |
2601M |
|
431116 |
2601M |
|
431117 |
2601M |
|
431124 |
2601M |
|
431125 |
2601M |
|
431128 |
2601M |
|
431130 |
2601M |
|
431132 |
2601M |
|
431134 |
2601M |
|
431137 |
2601M |
|
431141 |
2601M |
|
431146 |
2601M |
|
431153 |
2601M |
|
431154 |
2601M |
|
431155 |
2601M |
|
431157 |
2601M |
|
431160 |
2601M |
|
431162 |
2601M |
|
431168 |
2601M |
|
431176 |
2601M |
|
431187 |
2601M |
|
431191 |
2601M |
|
431196 |
2601M |
|
431202 |
2601M |
|
431203 |
2601M |
|
431204 |
2601M |
|