Query time 0.00208
JSON explain
{
"query_block": {
"select_id": 1,
"filesort": {
"sort_key": "products.`timestamp` desc, products.product_id",
"temporary_table": {
"nested_loop": [
{
"table": {
"table_name": "companies",
"access_type": "const",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "4",
"used_key_parts": ["company_id"],
"ref": ["const"],
"rows": 1,
"filtered": 100
}
},
{
"table": {
"table_name": "cscart_categories",
"access_type": "ALL",
"possible_keys": ["PRIMARY", "c_status", "p_category_id"],
"rows": 10,
"filtered": 100,
"attached_condition": "(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') and cscart_categories.storefront_id in (0,1)"
}
},
{
"table": {
"table_name": "products_categories",
"access_type": "ref",
"possible_keys": ["PRIMARY", "pt"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["category_id"],
"ref": ["v8.cscart_categories.category_id"],
"rows": 1,
"filtered": 100,
"using_index": true
}
},
{
"table": {
"table_name": "products",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "status", "idx_parent_product_id"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["product_id"],
"ref": ["v8.products_categories.product_id"],
"rows": 1,
"filtered": 98.07691956,
"attached_condition": "products.company_id = 3 and products.parent_product_id = 0 and (products.usergroup_ids = '' or find_in_set(0,products.usergroup_ids) or find_in_set(1,products.usergroup_ids)) and products.`status` = 'A' and products.product_type <> 'D'"
}
},
{
"table": {
"table_name": "descr1",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "product_id"],
"key": "PRIMARY",
"key_length": "9",
"used_key_parts": ["product_id", "lang_code"],
"ref": ["v8.products_categories.product_id", "const"],
"rows": 1,
"filtered": 100,
"attached_condition": "trigcond(descr1.lang_code = 'vn')"
}
},
{
"table": {
"table_name": "prices",
"access_type": "ref",
"possible_keys": [
"usergroup",
"product_id",
"lower_limit",
"usergroup_id"
],
"key": "usergroup",
"key_length": "3",
"used_key_parts": ["product_id"],
"ref": ["v8.products_categories.product_id"],
"rows": 1,
"filtered": 100,
"attached_condition": "prices.lower_limit = 1 and prices.usergroup_id in (0,0,1)",
"using_index": true
}
}
]
}
}
}
}
Result
| product_id |
product |
company_name |
product_type |
parent_product_id |
abt__ut2_mv_company_city |
abt__ut2_mv_company_country |
| 347 |
Cà Phê Sữa Hòa Tan K Delight 3in1 hộp 1275g – Ngọt Dịu |
K COFFEE |
P |
0 |
27058 |
VN |
| 346 |
Sốt Tiêu Xanh Ngâm Giấm K Pepper 180g – Chua Cay Chuẩn Vị |
K COFFEE |
P |
0 |
27058 |
VN |
| 345 |
Sốt Tiêu Xanh Ngâm Giấm K Pepper 130g – Chua Cay Chuẩn Vị |
K COFFEE |
P |
0 |
27058 |
VN |
| 344 |
Cà Phê Phin Giấy Blue Sơn La 105g – Đặc Sản Pha Nhanh |
K COFFEE |
P |
0 |
27058 |
VN |
| 343 |
Cà Phê Phin Giấy K Filter 105g – Pha Nhanh 30 Giây |
K COFFEE |
P |
0 |
27058 |
VN |
| 342 |
Hộp Quà Cà Phê K Coffee Love Box 4 709g (bộ) – Quà Tình Yêu |
K COFFEE |
P |
0 |
27058 |
VN |
| 341 |
Hộp Quà Cà Phê K Coffee Love Box 3 709g (bộ) – Quà Tình Yêu |
K COFFEE |
P |
0 |
27058 |
VN |
| 340 |
Hộp Quà Cà Phê K Coffee Love Box 2 709g (bộ) – Quà Tình Yêu |
K COFFEE |
P |
0 |
27058 |
VN |
| 339 |
Hộp Quà Cà Phê K Coffee Love Box 1 709g (bộ) – Quà Tình Yêu |
K COFFEE |
P |
0 |
27058 |
VN |
| 338 |
Hộp Quà Cà Phê K Coffee Bốn Mùa 547g (bộ) – Sum Vầy An Vui |
K COFFEE |
P |
0 |
27058 |
VN |
| 335 |
Cà Phê Sữa Hòa Tan K Delight 3in1 túi 612g – Ngọt Dịu |
K COFFEE |
P |
0 |
27058 |
VN |
| 334 |
Cà Phê Sữa Hòa Tan K Delight 3in1 túi 459g – Ngọt Dịu |
K COFFEE |
P |
0 |
27058 |
VN |
| 333 |
Cà Phê Sữa Hòa Tan K Delight 3in1 hộp 255g – Ngọt Dịu |
K COFFEE |
P |
0 |
27058 |
VN |
| 332 |
Cà Phê Sữa Hòa Tan K Delight 3in1 hộp 170g – Ngọt Dịu |
K COFFEE |
P |
0 |
27058 |
VN |
| 331 |
Cà Phê Sữa Hòa Tan K Delight 3in1 hộp 85g – Ngọt Dịu |
K COFFEE |
P |
0 |
27058 |
VN |
| 330 |
Cà Phê Sữa Hòa Tan K Delight 3in1 stick 17g – Ngọt Dịu |
K COFFEE |
P |
0 |
27058 |
VN |
| 325 |
Trà Cascara Blue Sơn La 112.5g cao cấp – Trà Vỏ Cà Phê |
K COFFEE |
P |
0 |
27058 |
VN |
| 324 |
Trà Cascara Blue Sơn La 112.5g – Trà Vỏ Cà Phê |
K COFFEE |
P |
0 |
27058 |
VN |
| 323 |
Trà Cascara Blue Sơn La 67.5g hộp thiếc – Trà Vỏ Cà Phê |
K COFFEE |
P |
0 |
27058 |
VN |
| 322 |
Trà Cascara Blue Sơn La 67.5g hộp giấy – Trà Vỏ Cà Phê |
K COFFEE |
P |
0 |
27058 |
VN |