Query time 0.00180
JSON explain
{
"query_block": {
"select_id": 1,
"filesort": {
"sort_key": "cscart_products_categories.product_id",
"temporary_table": {
"nested_loop": [
{
"table": {
"table_name": "cscart_categories",
"access_type": "ALL",
"possible_keys": ["PRIMARY", "c_status", "p_category_id"],
"rows": 7,
"filtered": 100,
"attached_condition": "cscart_categories.storefront_id in (0,2) 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": "cscart_products_categories",
"access_type": "ref",
"possible_keys": ["PRIMARY", "pt"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["category_id"],
"ref": ["batterycube.cscart_categories.category_id"],
"rows": 1,
"filtered": 31.68316841,
"index_condition": "cscart_products_categories.product_id in (71,42,43,44,45,46,70,47,48,41,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,72)"
}
},
{
"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", "batterycube.cscart_products_categories.product_id"],
"rows": 1,
"filtered": 100
}
}
]
}
}
}
}
Result
| product_id |
category_ids |
position |
| 41 |
4M |
0 |
| 42 |
4M |
0 |
| 43 |
4M |
0 |
| 44 |
4M |
0 |
| 45 |
4M |
0 |
| 46 |
4M |
0 |
| 47 |
4M |
0 |
| 48 |
4M |
0 |
| 49 |
4M |
0 |
| 50 |
4M |
0 |
| 51 |
4M |
0 |
| 52 |
4M |
0 |
| 53 |
4M |
0 |
| 54 |
4M |
0 |
| 55 |
4M |
0 |
| 56 |
4M |
0 |
| 57 |
4M |
0 |
| 58 |
4M |
0 |
| 59 |
4M |
0 |
| 60 |
4M |
0 |
| 61 |
4M |
0 |
| 62 |
4M |
0 |
| 63 |
4M |
0 |
| 64 |
4M |
0 |
| 65 |
4M |
0 |
| 66 |
4M |
0 |
| 67 |
4M |
0 |
| 68 |
4M |
0 |
| 69 |
4M |
0 |
| 70 |
4M |
0 |
| 71 |
4M |
0 |
| 72 |
4M |
0 |