Query time 0.00155
JSON explain
{
"query_block": {
"select_id": 1,
"cost": 0.033368335,
"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"],
"loops": 1,
"rows": 7,
"cost": 0.011130435,
"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"],
"loops": 7,
"rows": 1,
"cost": 0.012944317,
"filtered": 54.45544434,
"index_condition": "cscart_products_categories.product_id in (73,74,75,76,77,78,79,80,81,82,83,84,85,91,90,86,87,88,92,89,99,95,96,97,98,93,94)"
}
},
{
"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"],
"loops": 3.85,
"rows": 1,
"cost": 0.00686155,
"filtered": 100
}
}
]
}
}
}
}
Result
| product_id |
category_ids |
position |
| 73 |
6M |
|
| 74 |
6M |
|
| 75 |
6M |
|
| 76 |
6M |
|
| 77 |
6M |
|
| 78 |
6M |
|
| 79 |
6M |
|
| 80 |
6M |
|
| 81 |
6M |
|
| 82 |
6M |
|
| 83 |
6M |
|
| 84 |
6M |
|
| 85 |
6M |
|
| 86 |
5M |
0 |
| 87 |
5M |
0 |
| 88 |
5M |
0 |
| 89 |
5M |
0 |
| 90 |
5M |
0 |
| 91 |
5M |
0 |
| 92 |
5M |
0 |
| 93 |
5M |
0 |
| 94 |
5M |
0 |
| 95 |
5M |
0 |
| 96 |
5M |
0 |
| 97 |
5M |
0 |
| 98 |
5M |
0 |
| 99 |
5M |
0 |