Query time 0.00069
JSON explain
{
"query_block": {
"select_id": 1,
"cost": 0.162948242,
"nested_loop": [
{
"table": {
"table_name": "cscart_products_categories",
"access_type": "range",
"possible_keys": ["PRIMARY", "pt"],
"key": "pt",
"key_length": "3",
"used_key_parts": ["product_id"],
"loops": 1,
"rows": 32,
"cost": 0.05815448,
"filtered": 100,
"attached_condition": "cscart_products_categories.product_id in (406851,447289,403492,409045,411798,455469,403314,459175,412726,446945,419788,441409,421788,429875,408990,457492,402535,424481,421915,427033,425013,423301,403335,416458,413195,452439,456232,409981,422412,444874,411736,410485)",
"using_index": true
}
},
{
"table": {
"table_name": "cscart_categories",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "c_status", "p_category_id"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["category_id"],
"ref": ["u985510652_ecartify.cscart_products_categories.category_id"],
"loops": 32,
"rows": 1,
"cost": 0.02944128,
"filtered": 100,
"attached_condition": "cscart_categories.storefront_id in (0,1) and (cscart_categories.usergroup_ids = '' or find_in_set(0,cscart_categories.usergroup_ids) or find_in_set(1,cscart_categories.usergroup_ids)) and cscart_categories.`status` in ('A','H')"
}
},
{
"table": {
"table_name": "product_position_source",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "pt"],
"key": "PRIMARY",
"key_length": "6",
"used_key_parts": ["category_id", "product_id"],
"ref": [
"const",
"u985510652_ecartify.cscart_products_categories.product_id"
],
"loops": 32,
"rows": 1,
"cost": 0.05483648,
"filtered": 100
}
}
]
}
}
Result
| product_id |
category_ids |
position |
| 402535 |
289M |
|
| 403314 |
289M |
|
| 403335 |
289M |
|
| 403492 |
305M |
|
| 406851 |
305M |
|
| 408990 |
305M |
|
| 409045 |
305M |
|
| 409981 |
289M |
|
| 410485 |
305M |
|
| 411736 |
305M |
|
| 411798 |
289M |
|
| 412726 |
289M |
|
| 413195 |
305M |
|
| 416458 |
289M |
|
| 419788 |
305M |
|
| 421788 |
305M |
|
| 421915 |
305M |
|
| 422412 |
305M |
|
| 423301 |
289M |
|
| 424481 |
289M |
|
| 425013 |
305M |
|
| 427033 |
305M |
|
| 429875 |
305M |
|
| 441409 |
305M |
|
| 444874 |
305M |
|
| 446945 |
305M |
|
| 447289 |
289M |
|
| 452439 |
289M |
|
| 455469 |
305M |
|
| 456232 |
305M |
|
| 457492 |
289M |
|
| 459175 |
305M |
|