Query time 0.01541
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "86.69"
},
"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": 96,
"rows_produced_per_join": 96,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "9.89",
"eval_cost": "9.60",
"prefix_cost": "19.49",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (99987,99988,99989,99990,99991,99992,99993,99994,99995,99996,99997,99998,99999,100000,100001,100002,100003,100004,100005,100006,100007,100008,100009,100010,100011,100012,100013,100014,100015,100016,100017,100018,100019,100020,100021,100022,100023,100024,100025,100026,100027,100028,100029,100030,100031,100032,100033,100034,100035,100036,100037,100038,100039,100040,100041,100042,100043,100044,100045,100046,100047,100048,100049,100050,100051,100052,100053,100054,100055,100056,100057,100058,100059,100060,100061,100062,100063,100064,100065,100066,100073,100074,100075,100076,100077,100078,100079,100080,100081,100082,100083,100084,100085,100086,100087,100088))"
}
},
{
"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": 96,
"filtered": "100.00",
"cost_info": {
"read_cost": "24.00",
"eval_cost": "9.60",
"prefix_cost": "53.09",
"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": [
"nuie_scalesta_net.cscart_products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 4,
"filtered": "5.00",
"cost_info": {
"read_cost": "24.00",
"eval_cost": "0.48",
"prefix_cost": "86.69",
"data_read_per_join": "12K"
},
"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')))"
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 99987 |
7231M |
|
| 99988 |
7234M |
|
| 99989 |
7231M |
|
| 99990 |
7231M |
|
| 99991 |
7234M |
|
| 99992 |
7231M |
|
| 99993 |
7234M |
|
| 99994 |
7231M |
|
| 99995 |
7234M |
|
| 99996 |
7229M |
|
| 99997 |
7229M |
|
| 99998 |
7229M |
|
| 99999 |
7229M |
|
| 100000 |
7229M |
|
| 100001 |
7229M |
|
| 100002 |
7229M |
|
| 100003 |
7234M |
|
| 100004 |
7234M |
|
| 100005 |
7229M |
|
| 100006 |
7229M |
|
| 100007 |
7229M |
|
| 100008 |
7229M |
|
| 100009 |
7229M |
|
| 100010 |
7229M |
|
| 100011 |
7229M |
|
| 100012 |
7229M |
|
| 100013 |
7234M |
|
| 100014 |
7231M |
|
| 100015 |
7234M |
|
| 100016 |
7231M |
|
| 100017 |
7234M |
|
| 100018 |
7231M |
|
| 100019 |
7234M |
|
| 100020 |
7231M |
|
| 100021 |
7234M |
|
| 100022 |
7231M |
|
| 100023 |
7234M |
|
| 100024 |
7231M |
|
| 100025 |
7234M |
|
| 100026 |
7234M |
|
| 100027 |
7234M |
|
| 100028 |
7234M |
|
| 100029 |
7234M |
|
| 100030 |
7234M |
|
| 100031 |
7234M |
|
| 100032 |
7234M |
|
| 100033 |
7234M |
|
| 100034 |
7234M |
|
| 100035 |
7234M |
|
| 100036 |
7234M |
|
| 100037 |
7234M |
|
| 100038 |
7234M |
|
| 100039 |
7234M |
|
| 100040 |
7234M |
|
| 100041 |
7234M |
|
| 100042 |
7234M |
|
| 100043 |
7234M |
|
| 100044 |
7234M |
|
| 100045 |
7234M |
|
| 100046 |
7234M |
|
| 100047 |
7234M |
|
| 100048 |
7234M |
|
| 100049 |
7234M |
|
| 100050 |
7234M |
|
| 100051 |
7234M |
|
| 100052 |
7234M |
|
| 100053 |
7234M |
|
| 100054 |
7234M |
|
| 100055 |
7234M |
|
| 100056 |
7234M |
|
| 100057 |
7234M |
|
| 100058 |
7229M |
|
| 100059 |
7229M |
|
| 100060 |
7229M |
|
| 100061 |
7229M |
|
| 100062 |
7229M |
|
| 100063 |
7229M |
|
| 100064 |
7229M |
|
| 100065 |
7229M |
|
| 100066 |
7229M |
|
| 100073 |
7229M |
|
| 100074 |
7229M |
|
| 100075 |
7229M |
|
| 100076 |
7229M |
|
| 100077 |
7229M |
|
| 100078 |
7229M |
|
| 100079 |
7229M |
|
| 100080 |
7229M |
|
| 100081 |
7229M |
|
| 100082 |
7229M |
|
| 100083 |
7229M |
|
| 100084 |
7229M |
|
| 100085 |
7229M |
|
| 100086 |
7229M |
|
| 100087 |
7229M |
|
| 100088 |
7229M |
|