Query time 0.00120
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": 24,
"filtered": 100,
"index_condition": "cscart_products_categories.product_id in (176,196,175,189,187,195,186,185,193,167,178,179,190,180,181,169,165,171,159,177,739,738,1185,790)"
},
"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": ["bacpvdev_db.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')"
},
"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", "bacpvdev_db.cscart_products_categories.product_id"],
"rows": 1,
"filtered": 100
}
}
}
Result
product_id |
category_ids |
position |
159 |
27M |
0 |
165 |
27M |
0 |
167 |
27M |
0 |
169 |
27M |
0 |
171 |
27M |
0 |
175 |
27M |
0 |
176 |
27M |
0 |
177 |
27M |
0 |
178 |
27M |
0 |
179 |
27M |
0 |
180 |
27M |
0 |
181 |
27M |
0 |
185 |
27M |
0 |
186 |
27M |
0 |
187 |
27M |
0 |
189 |
27M |
0 |
190 |
27M |
0 |
193 |
27M |
0 |
195 |
27M |
0 |
196 |
27M |
0 |
738 |
27M |
0 |
739 |
27M |
0 |
790 |
27M |
0 |
1185 |
27M |
0 |