Query time 0.00123
JSON explain
{
"query_block": {
"select_id": 1,
"nested_loop": [
{
"table": {
"table_name": "pc",
"access_type": "range",
"possible_keys": ["PRIMARY", "pt"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["category_id"],
"rows": 154,
"filtered": 100,
"attached_condition": "pc.category_id in (165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,199,185,186,187,188,189,190,191,194,193,195,196,197,198,200,201,202,234,235,236,237,238,240,254,255,263)",
"using_index": true
}
},
{
"table": {
"table_name": "p",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "status", "idx_parent_product_id"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["product_id"],
"ref": ["cscart_4183_25.pc.product_id"],
"rows": 1,
"filtered": 91.16493988,
"attached_condition": "p.parent_product_id = 0 and p.`status` = 'A'"
}
},
{
"table": {
"table_name": "c",
"access_type": "ref",
"possible_keys": ["PRIMARY", "p_category_id"],
"key": "p_category_id",
"key_length": "3",
"used_key_parts": ["category_id"],
"ref": ["cscart_4183_25.pc.category_id"],
"rows": 1,
"filtered": 100,
"attached_condition": "c.`status` = 0",
"using_index": true
}
}
]
}
}
Result
product_id |
223 |
224 |
225 |
240 |
241 |
247 |
214 |
217 |
218 |
244 |
219 |
220 |
221 |
222 |
227 |
228 |
229 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
29 |
30 |
32 |
33 |
60 |
242 |
243 |
132 |
133 |
134 |
135 |
145 |
146 |
147 |
148 |
149 |
140 |
141 |
142 |
143 |
144 |
153 |
154 |
155 |
156 |
157 |
132 |
133 |
134 |
135 |
37 |
39 |
40 |
42 |
43 |
48 |
49 |
50 |
51 |
55 |
56 |
57 |
58 |
59 |
62 |
63 |
64 |
65 |
66 |
1 |
4 |
8 |
9 |
10 |
5 |
6 |
14 |
8 |
9 |
10 |
16 |
18 |
19 |
21 |
22 |
23 |
24 |
25 |
167 |
168 |
169 |
161 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
161 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
172 |
173 |
175 |
246 |
180 |
183 |
184 |
189 |
190 |
213 |
215 |
226 |
52 |
53 |
54 |
238 |
239 |
245 |
67 |
68 |
69 |
70 |
71 |
113 |
117 |
120 |
125 |
86 |
101 |
105 |
106 |
72 |
73 |
74 |
75 |
76 |
248 |