Query time 0.00283
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 (351555,355162,357394,359184,350155,350822,352138,352551,353205,353705,355264,355494,355511,356599,357117,351427,354504,355815,356042,350248,352377,352385,353616,354889,356579,357370,357926,358666,349777,353499,353646,356614,357549,349785,349888,350077,352767,354543,356178,350143,351571,352945,354660,354668,357354,349767,350509,353486,353670,357359,357723,358183,359144,350763,351206,351767,352020,352137,352527,356666,349728,349948,351158,351170,352579,353241,354303,355534,356941,359404,350303,350864,350882,351133,351147,351240,351688,353596,353740,354186,356498,356823,357051,357688,358111,349753,350085,351726,353130,353408,353680,353903,356642,357309,349850,350427,350590,356779,350837,351809))"
}
},
{
"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 |
349728 |
2916M |
|
349753 |
2916M |
|
349767 |
2916M |
|
349777 |
2916M |
|
349785 |
2916M |
|
349850 |
2916M |
|
349888 |
2916M |
|
349948 |
2916M |
|
350077 |
2916M |
|
350085 |
2916M |
|
350143 |
2916M |
|
350155 |
2916M |
|
350248 |
2913M |
|
350303 |
2913M |
|
350427 |
2913M |
|
350509 |
2913M |
|
350590 |
2913M |
|
350763 |
2920M |
|
350822 |
2920M |
|
350837 |
2920M |
|
350864 |
2920M |
|
350882 |
2920M |
|
351133 |
2920M |
|
351147 |
2920M |
|
351158 |
2920M |
|
351170 |
2920M |
|
351206 |
2920M |
|
351240 |
2916M |
|
351427 |
2916M |
|
351555 |
2916M |
|
351571 |
2916M |
|
351688 |
2920M |
|
351726 |
2916M |
|
351767 |
2916M |
|
351809 |
2916M |
|
352020 |
2916M |
|
352137 |
2916M |
|
352138 |
2916M |
|
352377 |
2916M |
|
352385 |
2916M |
|
352527 |
2916M |
|
352551 |
2916M |
|
352579 |
2916M |
|
352767 |
2920M |
|
352945 |
3408M |
|
353130 |
3105M |
|
353205 |
3408M |
|
353241 |
3105M |
|
353408 |
3408M |
|
353486 |
3105M |
|
353499 |
3105M |
|
353596 |
3408M |
|
353616 |
3408M |
|
353646 |
3105M |
|
353670 |
3408M |
|
353680 |
3408M |
|
353705 |
2913M |
|
353740 |
3105M |
|
353903 |
3408M |
|
354186 |
3105M |
|
354303 |
3408M |
|
354504 |
2916M |
|
354543 |
2916M |
|
354660 |
3105M |
|
354668 |
3105M |
|
354889 |
2920M |
|
355162 |
2920M |
|
355264 |
2920M |
|
355494 |
3105M |
|
355511 |
3105M |
|
355534 |
3105M |
|
355815 |
2916M |
|
356042 |
2916M |
|
356178 |
2920M |
|
356498 |
2916M |
|
356579 |
2916M |
|
356599 |
2916M |
|
356614 |
2916M |
|
356642 |
2916M |
|
356666 |
2916M |
|
356779 |
3105M |
|
356823 |
3105M |
|
356941 |
2920M |
|
357051 |
2920M |
|
357117 |
2920M |
|
357309 |
2920M |
|
357354 |
2920M |
|
357359 |
2920M |
|
357370 |
2920M |
|
357394 |
2920M |
|
357549 |
2916M |
|
357688 |
2920M |
|
357723 |
2920M |
|
357926 |
2920M |
|
358111 |
2920M |
|
358183 |
2920M |
|
358666 |
2916M |
|
359144 |
2920M |
|
359184 |
2920M |
|
359404 |
2916M |
|