Query time 0.00326
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 (353532,356902,357282,350575,355728,356167,350926,357286,356512,349790,351099,354282,358480,350638,350688,353865,357710,352980,353206,355154,358261,351951,352073,351462,352653,354290,351935,352811,352873,354375,359089,359114,350517,355847,349813,352946,353520,353681,354627,354811,359311,351432,355249,358215,354018,354435,354914,356477,357143,349716,350536,352173,352739,353489,350939,357331,352468,356663,357269,350547,351953,350816,354295,357466,358621,349648,351487,356045,351853,356054,356596,356682,358680,351050,352974,357372,358921,355190,351314,352331,353884,358851,352036,357127,358158,351164,351319,356338,358667,353173,354778,355935,351970,353344,355203,356622,350069,350576,351389,355200))"
}
},
{
"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 |
349648 |
2916M |
|
349716 |
2916M |
|
349790 |
2916M |
|
349813 |
2916M |
|
350069 |
2916M |
|
350517 |
2913M |
|
350536 |
2913M |
|
350547 |
2913M |
|
350575 |
2913M |
|
350576 |
2913M |
|
350638 |
2920M |
|
350688 |
2920M |
|
350816 |
2920M |
|
350926 |
2920M |
|
350939 |
2920M |
|
351050 |
2920M |
|
351099 |
2920M |
|
351164 |
2920M |
|
351314 |
2916M |
|
351319 |
2916M |
|
351389 |
2916M |
|
351432 |
2916M |
|
351462 |
2916M |
|
351487 |
2920M |
|
351853 |
2916M |
|
351935 |
2916M |
|
351951 |
2916M |
|
351953 |
2916M |
|
351970 |
2920M |
|
352036 |
2916M |
|
352073 |
2916M |
|
352173 |
2916M |
|
352331 |
2916M |
|
352468 |
2916M |
|
352653 |
2916M |
|
352739 |
2916M |
|
352811 |
3105M |
|
352873 |
3105M |
|
352946 |
3408M |
|
352974 |
3408M |
|
352980 |
3408M |
|
353173 |
3408M |
|
353206 |
3408M |
|
353344 |
3408M |
|
353489 |
3105M |
|
353520 |
3408M |
|
353532 |
3408M |
|
353681 |
3408M |
|
353865 |
2920M |
|
353884 |
3408M |
|
354018 |
3105M |
|
354282 |
3105M |
|
354290 |
3105M |
|
354295 |
3408M |
|
354375 |
2916M |
|
354435 |
2916M |
|
354627 |
2916M |
|
354778 |
2916M |
|
354811 |
2916M |
|
354914 |
2920M |
|
355154 |
2920M |
|
355190 |
2920M |
|
355200 |
2920M |
|
355203 |
2920M |
|
355249 |
2920M |
|
355728 |
2916M |
|
355847 |
2916M |
|
355935 |
2916M |
|
356045 |
2916M |
|
356054 |
2916M |
|
356167 |
2920M |
|
356338 |
2916M |
|
356477 |
2916M |
|
356512 |
2916M |
|
356596 |
2916M |
|
356622 |
2916M |
|
356663 |
2916M |
|
356682 |
2916M |
|
356902 |
3105M |
|
357127 |
2920M |
|
357143 |
2916M |
|
357269 |
2920M |
|
357282 |
2920M |
|
357286 |
2920M |
|
357331 |
2920M |
|
357372 |
2920M |
|
357466 |
2916M |
|
357710 |
2920M |
|
358158 |
2920M |
|
358215 |
2920M |
|
358261 |
2920M |
|
358480 |
2916M |
|
358621 |
2916M |
|
358667 |
2916M |
|
358680 |
2916M |
|
358851 |
2916M |
|
358921 |
2916M |
|
359089 |
2916M |
|
359114 |
2920M |
|
359311 |
2920M |
|