Query time 0.00278
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "68.46"
},
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": true,
"cost_info": {
"sort_cost": "1.60"
},
"nested_loop": [
{
"table": {
"table_name": "cscart_categories",
"access_type": "ALL",
"possible_keys": [
"PRIMARY",
"c_status",
"p_category_id"
],
"rows_examined_per_scan": 40,
"rows_produced_per_join": 1,
"filtered": "4.00",
"cost_info": {
"read_cost": "4.54",
"eval_cost": "0.16",
"prefix_cost": "4.70",
"data_read_per_join": "6K"
},
"used_columns": [
"category_id",
"storefront_id",
"usergroup_ids",
"status"
],
"attached_condition": "((`gaseus`.`cscart_categories`.`storefront_id` in (0,1)) and ((`gaseus`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`gaseus`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`gaseus`.`cscart_categories`.`usergroup_ids`))) and (`gaseus`.`cscart_categories`.`status` in ('A','H')))"
}
},
{
"table": {
"table_name": "cscart_products_categories",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"gaseus.cscart_categories.category_id"
],
"rows_examined_per_scan": 110,
"rows_produced_per_join": 1,
"filtered": "0.91",
"index_condition": "(`gaseus`.`cscart_products_categories`.`product_id` in (450,451,452,453,454,455,1932,1933,1934,1935,1936,1937,1938,1939,1940,1941,1942,1943,1944,1945,1946,1947,1948,1949,1950,1951,1952,1953,1954,1955,1956,1957,1958,1959,1960,1961,1962,1963,1964,1965,1966,1967,1968,1969,1970,1971,1972,1973,1974,1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,4253,4254,4255,4256,4257,4258,4259,4260,4261,5614,5615,5616,5617,5618,5619,5620,5621,5622,5623,5624,5625,5626,5627,5628,5629,5630,5631,5632,5633,5634,5635,5636,5637,5638,5639,5640,5641))",
"cost_info": {
"read_cost": "44.00",
"eval_cost": "0.16",
"prefix_cost": "66.30",
"data_read_per_join": "25"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
]
}
},
{
"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",
"gaseus.cscart_products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.40",
"eval_cost": "0.16",
"prefix_cost": "66.86",
"data_read_per_join": "25"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 450 |
308M |
|
| 451 |
308M |
|
| 452 |
308M |
|
| 453 |
308M |
|
| 454 |
308M |
|
| 455 |
308M |
|
| 1932 |
308M |
|
| 1933 |
308M |
|
| 1934 |
308M |
|
| 1935 |
308M |
|
| 1936 |
308M |
|
| 1937 |
308M |
|
| 1938 |
308M |
|
| 1939 |
308M |
|
| 1940 |
308M |
|
| 1941 |
308M |
|
| 1942 |
308M |
|
| 1943 |
308M |
|
| 1944 |
308M |
|
| 1945 |
308M |
|
| 1946 |
308M |
|
| 1947 |
308M |
|
| 1948 |
308M |
|
| 1949 |
308M |
|
| 1950 |
308M |
|
| 1951 |
308M |
|
| 1952 |
308M |
|
| 1953 |
308M |
|
| 1954 |
308M |
|
| 1955 |
308M |
|
| 1956 |
308M |
|
| 1957 |
308M |
|
| 1958 |
308M |
|
| 1959 |
308M |
|
| 1960 |
308M |
|
| 1961 |
308M |
|
| 1962 |
308M |
|
| 1963 |
308M |
|
| 1964 |
308M |
|
| 1965 |
308M |
|
| 1966 |
308M |
|
| 1967 |
308M |
|
| 1968 |
308M |
|
| 1969 |
308M |
|
| 1970 |
308M |
|
| 1971 |
308M |
|
| 1972 |
308M |
|
| 1973 |
308M |
|
| 1974 |
308M |
|
| 1975 |
308M |
|
| 1976 |
308M |
|
| 1977 |
308M |
|
| 1978 |
308M |
|
| 1979 |
308M |
|
| 1980 |
308M |
|
| 1981 |
308M |
|
| 1982 |
308M |
|
| 1983 |
308M |
|
| 1984 |
308M |
|
| 4253 |
308M |
|
| 4254 |
308M |
|
| 4255 |
308M |
|
| 4256 |
308M |
|
| 4257 |
308M |
|
| 4258 |
308M |
|
| 4259 |
308M |
|
| 4260 |
308M |
|
| 4261 |
308M |
|
| 5614 |
308M |
|
| 5615 |
308M |
|
| 5616 |
308M |
|
| 5617 |
308M |
|
| 5618 |
308M |
|
| 5619 |
308M |
|
| 5620 |
308M |
|
| 5621 |
308M |
|
| 5622 |
308M |
|
| 5623 |
308M |
|
| 5624 |
308M |
|
| 5625 |
308M |
|
| 5626 |
308M |
|
| 5627 |
308M |
|
| 5628 |
308M |
|
| 5629 |
308M |
|
| 5630 |
308M |
|
| 5631 |
308M |
|
| 5632 |
308M |
|
| 5633 |
308M |
|
| 5634 |
308M |
|
| 5635 |
308M |
|
| 5636 |
308M |
|
| 5637 |
308M |
|
| 5638 |
308M |
|
| 5639 |
308M |
|
| 5640 |
308M |
|
| 5641 |
308M |
|