Query time 0.01419
JSON explain
{
"query_block": {
"select_id": 1,
"filesort": {
"sort_key": "popularity.total desc, products.product_id",
"temporary_table": {
"nested_loop": [
{
"table": {
"table_name": "products",
"access_type": "range",
"possible_keys": ["PRIMARY", "status"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["product_id"],
"rows": 17,
"filtered": 52.06833649,
"index_condition": "products.product_id in (5448,28159,33733,36234,41007,46170,46694,46982,47655,47853,48813,49209,49230,49550,48472,43817,49164)",
"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": "descr1",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "product_id"],
"key": "PRIMARY",
"key_length": "11",
"used_key_parts": ["product_id", "lang_code"],
"ref": ["dev_db.products.product_id", "const"],
"rows": 1,
"filtered": 100,
"attached_condition": "trigcond(descr1.lang_code = 'vi')"
}
},
{
"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_product_review_prepared_data",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "7",
"used_key_parts": ["product_id", "storefront_id"],
"ref": ["dev_db.products.product_id", "const"],
"rows": 1,
"filtered": 100
}
},
{
"table": {
"table_name": "popularity",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "total"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["product_id"],
"ref": ["dev_db.products.product_id"],
"rows": 1,
"filtered": 100
}
},
{
"table": {
"table_name": "prices",
"access_type": "ref",
"possible_keys": [
"usergroup",
"product_id",
"lower_limit",
"usergroup_id"
],
"key": "product_id",
"key_length": "3",
"used_key_parts": ["product_id"],
"ref": ["dev_db.products.product_id"],
"rows": 1,
"filtered": 99.9960556,
"attached_condition": "prices.lower_limit = 1 and prices.usergroup_id in (0,0,1) and prices.usergroup_id in (0,0,1)"
}
},
{
"table": {
"table_name": "products_categories",
"access_type": "ref",
"possible_keys": ["PRIMARY", "pt"],
"key": "pt",
"key_length": "3",
"used_key_parts": ["product_id"],
"ref": ["dev_db.products.product_id"],
"rows": 1,
"filtered": 100
}
},
{
"table": {
"table_name": "cscart_categories",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "p_category_id"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["category_id"],
"ref": ["dev_db.products_categories.category_id"],
"rows": 1,
"filtered": 100,
"using_index": true
}
}
]
}
}
}
}
Result
product_id |
product |
company_name |
product_type |
parent_product_id |
average_rating |
product_reviews_count |
49164 |
Sổ Tay Bìa Vải Handmade Phiên Bản Giới Hạn, CHUS x Pilgrim Notebook, Quà Tặng Đẳng Cấp Cho Những Ai Giàu Kiến Thức - Kinh Nghiệm - Trải Nghiệm |
Chus - Love from Vietnam |
P |
0 |
5.00 |
10 |
49230 |
Bộ Quà Tặng Ấm Trà Lục Giác Xanh Pha Lê, Bst Crystal Green, Món Quà Tân Gia Hoàn Hảo, Quà Tặng Gốm Sứ Việt Nam, Quà Tặng Cho Người Nước Ngoài |
Gốm Đông Gia |
P |
0 |
|
0 |
28159 |
Set Quà Hạt Tiêu Hộp Lớn, Hộp Quà Tặng Bằng Tre, Hộp Quà Gia Vị Bếp, Thế Giới Quà Tết, Set Hạt Tiêu Nhiều Loại |
The Hồ Tiêu |
P |
0 |
5.00 |
2 |
43817 |
Bộ Quà Tặng Từ Tre Khắc Chữ Theo Yêu Cầu (Bình Giữ Nhiệt Và Ly Tre), Phụ Kiện Bếp Xanh, Ly Tre, Đồ Dùng Bằng Tre, Quà Tặng Độc Đáo, Quà Tặng Cá Nhân Hóa |
Tre Việt |
P |
0 |
4.93 |
14 |
47655 |
Hộp Quà Pháp Lam Mộc Truly Hue's 2024, Món Quà Cố Đô, Set Quà Đặc Sản, Quà Việt Nam, Quà Biếu Tết, Quà Tặng Người Nước Ngoài |
Mộc Truly Huế |
P |
0 |
5.00 |
15 |
46982 |
Bút Khảm Trai, Kỹ Thuật Chế Tác Tinh Xảo, Hoạ Tiết Cầu Kì, Vẻ Đẹp Tinh Tế và Sang Trọng, Nghệ Thuật Khảm Trai Truyền Thống, Quà Tặng Cao Cấp |
Hadung Craft |
P |
0 |
5.00 |
1 |
46694 |
Túi Tote Da Vachetta Cao Cấp, Dáng Ngang, Khắc Tên Theo Yêu Cầu, Thiết Kế Sang Trọng Và Phong Cách, Quà Tặng Thời Trang, Quà Tặng Bạn Gái |
Freewill Leather |
P |
0 |
5.00 |
9 |
5448 |
Mô Hình Du Thuyền Buồm Epoxy Lucky L600.T5 - Biểu Tượng Thành Công, Quà Tặng Doanh Nghiệp Cao Cấp, Đế Gỗ |
HAHAWAVE |
P |
0 |
5.00 |
1 |
41007 |
Cá Chép Bạc, Tranh Bạc Đậu, Sản Phẩm Thủ Công, Phương Pháp Đậu Bạc Truyền Thống, Tranh Trang Trí, Quà Tặng Đẳng Cấp |
Silver Soul Studio- Handmade in Vietnam |
P |
0 |
5.00 |
1 |
47853 |
Hộp Quà Hạt Điều Tinh Hoa Deluxe 2024 |
KAZ Original Taste |
P |
0 |
5.00 |
7 |
46170 |
[Giới Hạn] Tranh In Linocut 3 Lồng Khung Gỗ |
Havu Art studio |
P |
0 |
|
|
48813 |
Tranh Len Nghệ Thuật “Vinh Hoa”, Tranh Len, Quà Tặng Thủ Công, Tranh Nghệ Thuật, Tranh Treo, Trang Trí Nội Thất, Tranh Phong Cách Tĩnh Vật, Quà Tặng Độc Đáo |
Woolart by lybangnguyen |
P |
0 |
|
|
36234 |
Tượng Trâu Sơn Mài, Đỏ |
EMOI Jewelry |
P |
0 |
|
0 |
49550 |
Bật Lửa Long Vũ Cửu Thiên Bọc Da Vẽ Tay, Khắc Tên Theo Yêu Cầu, Lan Tỏa Khí Chất Hoàng Gia, Bật Lửa Khắc Tên, Quà Tặng Cho Nam, Quà Tặng Cá Nhân Hóa |
ĐỎ |
P |
0 |
|
|
48472 |
Trí Robusta, Cà Phê Robusta Honey Đắk Hà Nguyên Chất 100%, Vị Me Và Tắc, Quà Tặng Cà Phê Sạch Hương Vị Đậm Đà, Quà Tặng Cà Phê Việt Nam |
Gióng |
P |
0 |
|
0 |
49209 |
Hộp Quà Đam Mê, Set Quà Hạt Dinh Dưỡng Tiện Lợi, Bắt Đầu Ngày Mới Tràn Đầy Năng Lượng, Quà Tặng Sức Khoẻ, Món Quà Ý Nghĩa |
Happi Oha |
P |
0 |
|
|