Query time 0.00122
JSON explain
{
"query_block": {
"select_id": 1,
"table": {
"table_name": "cscart_products_categories",
"access_type": "range",
"possible_keys": ["PRIMARY", "pt"],
"key": "pt",
"key_length": "3",
"used_key_parts": ["product_id"],
"rows": 35,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (148,180,18,16,4,5,23,24,1,22,149,227,190,189,245,238,239,242,243,241,240,214,217,218,207,59,58,60,172,134,135,168)"
},
"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", "c.cscart_products_categories.product_id"],
"rows": 1,
"filtered": 100
},
"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": ["c.cscart_products_categories.category_id"],
"rows": 1,
"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')"
}
}
}
Result
| product_id |
category_ids |
position |
| 1 |
190M |
|
| 4 |
190M |
|
| 5 |
191M |
|
| 16 |
194M |
|
| 18 |
194M |
|
| 22 |
195M |
|
| 23 |
195M |
|
| 24 |
195M |
|
| 58 |
188M |
|
| 59 |
188M |
|
| 60 |
176M |
|
| 134 |
179,182M |
|
| 135 |
179,182M |
|
| 148 |
179M |
|
| 149 |
179M |
|
| 168 |
198,199,197M |
|
| 172 |
199M |
|
| 180 |
200M |
|
| 189 |
200M |
|
| 190 |
200M |
|
| 207 |
171M |
|
| 214 |
168M |
|
| 217 |
168M |
|
| 218 |
168M |
|
| 227 |
170M |
|
| 238 |
235M |
|
| 239 |
235M |
|
| 240 |
165M |
|
| 241 |
165M |
|
| 242 |
178M |
|
| 243 |
178M |
|
| 245 |
235M |
|