Query time 0.09072
JSON explain
{
"query_block": {
"select_id": 1,
"filesort": {
"sort_key": "cd.category",
"temporary_table": {
"nested_loop": [
{
"table": {
"table_name": "cscart_categories",
"access_type": "const",
"possible_keys": ["PRIMARY", "p_category_id"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["category_id"],
"ref": ["const"],
"rows": 1,
"filtered": 100,
"using_index": true
}
},
{
"table": {
"table_name": "products_tag_categories",
"access_type": "ref",
"possible_keys": ["PRIMARY", "pt"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["category_id"],
"ref": ["const"],
"rows": 595,
"filtered": 100,
"using_index": true
}
},
{
"table": {
"table_name": "products",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "status"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["product_id"],
"ref": ["dev_db.products_tag_categories.product_id"],
"rows": 1,
"filtered": 51.89157104,
"attached_condition": "(products.amount > 0 or products.tracking = 'D') and (products.usergroup_ids = '' or find_in_set(0,products.usergroup_ids) or find_in_set(1,products.usergroup_ids)) and products.`status` = 'A'"
}
},
{
"table": {
"table_name": "companies",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "4",
"used_key_parts": ["company_id"],
"ref": ["dev_db.products.company_id"],
"rows": 1,
"filtered": 100,
"attached_condition": "companies.`status` = 'A'"
}
},
{
"table": {
"table_name": "cscart_products_categories",
"access_type": "ref",
"possible_keys": ["pt"],
"key": "pt",
"key_length": "3",
"used_key_parts": ["product_id"],
"ref": ["dev_db.products_tag_categories.product_id"],
"rows": 1,
"filtered": 100
}
},
{
"table": {
"table_name": "cd",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "9",
"used_key_parts": ["category_id", "lang_code"],
"ref": ["dev_db.cscart_products_categories.category_id", "const"],
"rows": 1,
"filtered": 100,
"attached_condition": "trigcond(cd.lang_code = 'en')"
}
}
]
}
}
}
}
Result
variant_id |
variant |
99 |
Accessories |
182 |
Anti Insect and Deodorant |
105 |
Arts and Crafts |
158 |
Backpack |
100 |
Bags and Wallets |
174 |
Bath and Body Care |
142 |
Bracelets and Bangles |
313 |
Ceramic |
112 |
Cereal, Granola |
114 |
Chocolate |
550 |
Chus Exclusive |
123 |
Coffee |
315 |
Corporate Gifts |
120 |
Craft Beer & Wine |
191 |
Dolls and Miniatures |
195 |
Drawing and Illustration |
157 |
Eco Bags |
193 |
Fiber Arts |
165 |
Furniture |
201 |
Games and Puzzles |
412 |
Gift Box |
119 |
Gift Sets |
110 |
Gifts |
323 |
Gifts For Business Partners |
321 |
Gifts For Colleagues |
210 |
Gifts For Her |
209 |
Gifts For Him |
211 |
Gifts For Kids |
145 |
Hair Accessories |
159 |
Hand Bags |
213 |
Holiday Gifts |
166 |
Home Decoration |
117 |
Honey |
149 |
Keychains |
319 |
Kids Fashion |
340 |
Kitchenware |
156 |
Knitted Bags |
154 |
Leather Bags |
183 |
Massage Tools |
153 |
Matches and Lighters |
184 |
Meditation |
316 |
Men's Fashion |
144 |
Necklaces |
197 |
Notebooks and Paper |
111 |
Nuts, Seeds |
181 |
Oils and Essential Oils |
151 |
Other Accessories |
161 |
Other Bags |
403 |
Others |
150 |
Patches & Pins |
196 |
Pen |
176 |
Perfume |
409 |
Personalized Gifts |
152 |
Phone Accessories |
194 |
Photography |
199 |
Postcards |
124 |
Powder |
115 |
Rice and Pasta |
169 |
Scented Candles |
116 |
Snacks |
212 |
Souvenir |
118 |
Spices and Sauces |
106 |
Stationery |
192 |
Stickers |
215 |
Stuffed Toys |
122 |
Tea and Infusions |
155 |
Tote Bags |
107 |
Toys |
160 |
Wallets |
317 |
Women's Fashion |