SELECT 
  SQL_CALC_FOUND_ROWS products.product_id, 
  descr1.product as product, 
  companies.company as company_name, 
  products.product_type, 
  products.parent_product_id, 
  cscart_product_review_prepared_data.average_rating average_rating, 
  cscart_product_review_prepared_data.reviews_count product_reviews_count 
FROM 
  cscart_products as products 
  LEFT JOIN cscart_product_descriptions as descr1 ON descr1.product_id = products.product_id 
  AND descr1.lang_code = 'vi' 
  LEFT JOIN cscart_product_prices as prices ON prices.product_id = products.product_id 
  AND prices.lower_limit = 1 
  LEFT JOIN cscart_companies AS companies ON companies.company_id = products.company_id 
  LEFT JOIN cscart_products_tag_categories as products_tag_categories ON products_tag_categories.product_id = products.product_id 
  LEFT JOIN cscart_categories ON cscart_categories.category_id = products_tag_categories.category_id 
  LEFT JOIN cscart_product_review_prepared_data ON cscart_product_review_prepared_data.product_id = products.product_id 
  AND cscart_product_review_prepared_data.storefront_id = 0 
  LEFT JOIN cscart_product_popularity as popularity ON popularity.product_id = products.product_id 
WHERE 
  1 
  AND cscart_categories.category_id IN (490) 
  AND products.product_id NOT IN (
    40310, 2695, 22020, 35175, 47606, 43852, 
    47657, 47902, 48220, 48559, 48652, 
    49009, 49105, 319, 35249, 36305
  ) 
  AND companies.status IN ('A') 
  AND (
    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 IN ('A') 
  AND prices.usergroup_id IN (0, 0, 1) 
  AND products.parent_product_id = 0 
GROUP BY 
  products.product_id 
ORDER BY 
  popularity.total desc, 
  products.product_id ASC 
LIMIT 
  288, 32

Query time 0.14788

JSON explain

{
  "query_block": {
    "select_id": 1,
    "filesort": {
      "sort_key": "popularity.total desc, products.product_id",
      "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": 892,
              "filtered": 100,
              "attached_condition": "products_tag_categories.category_id <=> 490",
              "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": ["dev_db.products_tag_categories.product_id"],
              "rows": 1,
              "filtered": 18.54700279,
              "index_condition": "products.product_id not in (40310,2695,22020,35175,47606,43852,47657,47902,48220,48559,48652,49009,49105,319,35249,36305)",
              "attached_condition": "products.parent_product_id = 0 and (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": "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_tag_categories.product_id", "const"],
              "rows": 1,
              "filtered": 100,
              "attached_condition": "trigcond(descr1.lang_code = 'vi')"
            }
          },
          {
            "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_tag_categories.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_tag_categories.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_tag_categories.product_id"],
              "rows": 1,
              "filtered": 99.9960556,
              "attached_condition": "prices.lower_limit = 1 and prices.usergroup_id in (0,0,1)"
            }
          }
        ]
      }
    }
  }
}

Result

product_id product company_name product_type parent_product_id average_rating product_reviews_count
47904 Hộp Quà Atisô Hữu Cơ, Combo 4 - LArti’s Farm LArti's Farm P 0
3196 Nến Thơm Sáp Đậu Nành Thiên Nhiên, Sả Chanh Limart - Zero waste P 0 5.00 1
5267 Trà Hương Thảo, Túi Zip 10g, Trà Rosemary, Trà Thảo Mộc, Thư Giãn Tâm Trí, Trà Tỉnh Táo, Tốt Cho Tiêu Hóa, Quà Sức Khỏe, Quà Cho Gia Đình Là Nhiên P 0 4.13 8
2805 Trọn Bộ Chăm Sóc Tóc Thảo Mộc DONA LAB P 0 5.00 2
6101 Trà Kombucha Chankuất 250ml - Thanh Lọc Cơ Thể, Tăng Cường Lợi Khuẩn, Vị Quất Chanh Tươi Mát, Đồ Uống Lên Men Tốt Cho Tiêu Hóa Hở buôn chà P 0 5.00 2
5765 Set Gối Thảo Mộc Văn Phòng, Gối Thảo Mộc Chườm Mắt, Gối Chườm Cổ Vai Gáy, Gối Ngủ Văn Phòng, Gối Tựa Lưng Văn Phòng 1LIFE P 0 5.00 1
33703 Trâm Cài Tóc Gỗ Resin Thân Điêu Khắc, Nét Đẹp Truyền Thống, Chất Liệu Chắc Chắn, Không Dễ Gãy, Kỹ Thuật Tinh Xảo Trâm cài tóc BHK Việt Nam P 0 5.00 2
41444 Túi Da Vân Cá Sấu Bianca Màu Đen, Chất Liệu Da Thật Cao Cấp, Thiết Kế Thời Thường, Phụ Kiện Thanh Lịch, Phong Cách Thời Trang Hoi An Soul P 0 5.00 1
5280 The Charm - Trà Sắc Đẹp, Túi Zip 10g, Trà Tốt Cho Phụ Nữ, Trà Thảo Mộc Mix, Trà Dưỡng Nhan, Quà Tặng Healthy, Trà Sắc Đẹp Là Nhiên P 0 4.90 20
1517 Combo 3 Sản Phẩm Chăm Sóc Tóc, Dầu Gội, Dầu Xả, Serum Dưỡng Tóc Tiện Dụng, Chăm Sóc Tóc Toàn Diện, Nuôi Dưỡng Tóc Chắc Khỏe Om Fountain P 0 5.00 1
37282 Trâm Cài Tóc Gỗ Hoàng Đế Phượng Linh Cẩm Mịch Húc Phượng, Kỹ thuật Thủ Công Tinh Xảo, Chất Liệu Gỗ Cứng Cáp, Độ Bền Cao Trâm cài tóc BHK Việt Nam P 0 5.00 1
40755 Túi Chườm Thảo Mộc Thêu Tên, Thư Giãn Hiệu Quả, Quà Tặng Sức Khoẻ, Quà Tặng Mẹ, Quà Tặng Người Thương Là Nhiên P 0 5.00 16
40759 Nước Mắm Cốt Nhĩ Cá Cơm 500ml Nước mắm Hoàng Gia P 0 5.00 2
26865 Mật Ong Nguyên Chất 3 Sao Rừng Nhiệt Đới, Mật Ong Honimore Chính Hãng, Mật Ong Rừng Thiên Nhiên, Mật Ong Rừng Nguyên Chất Honimore P 0 5.00 2
35465 Kombucha Táo 500ml - Vị Táo Thanh Ngọt, Lợi Khuẩn Tiêu Hóa, Thức Uống Lên Men Sức Khỏe, Giao Nhanh Chóng Jan's lenmen P 0 5.00 4
40421 Trà Hoà Tan Lạc Tiên Tâm Sen, Trà Hòa Tan Thảo Mộc, Thảo Dược Việt Nam, Tự Nhiên, Tốt Cho Sức Khỏe, Tốt Cho Giấc Ngủ, Nâng Cao Sức Đề Kháng Hygie and Panacee P 0 5.00 9
35464 Kombucha Lê 500ml - Hương Chuối Tự Nhiên, Lợi Khuẩn Tiêu Hóa, Thức Uống Lên Men Sức Khỏe, Giao Hỏa Tốc Jan's lenmen P 0 5.00 5
41430 THANH XUÂN, Khăn Lụa Tơ Tằm Vuông 70cm Cuốn Viền Thủ Công, Khăn Choàng Lụa, Thiết Kế Thời Trang, Chất Liệu Lụa Làm Tay, Phụ Kiện Thời Trang Sang Trọng MsKÉN P 0 5.00 10
33701 Trâm Cài Tóc Gỗ Resin Đầu Tròn, Hoạ Tiết Hoa Duyên Dáng, Màu Sắc Nhã Nhặn, Chắc Liệu Gỗ Cứng Cáp, Phụ Kiện Sang Trọng Trâm cài tóc BHK Việt Nam P 0 5.00 4
31650 Viên Nhàu Nguyên Chất, Thực Phẩm Chức Năng, Viên Nhàu Thải Độc Tố, Viên Nhàu Tự Nhiên, Viên Tinh Chất Trái Nhàu Bonie Bee P 0 0
31649 Que Khuấy Mật Ong Bằng Gỗ, Thiết Kế Đầu Xoắn, Hạn Chế Sản Sinh Chất Độc Hại Cho Mật, Dễ Điều Chỉnh Lượng Mật Ong Lấy Ra, Dễ Dàng Sử Dụng Bonie Bee P 0
18749 Gối Vải Gai Dầu Maa, Tông Màu Nhã Nhặn, Mang Lại Cảm Giác Thoải Mái, Không Bị Mốc Khi Sử Dụng, Không Chứa Chất Độc Hại, Sản Phẩm Thủ Công, Hemp Oi P 0 5.00 1
37885 Khăn Lụa Bạch Hạc, Khăn Lụa Mềm Mịn, Khăn Lụa In Hạc Trắng, Khăn Lụa Màu Xanh Lá, Phong Cách Vintage, Quà Tặng Mẹ Folksight P 0 5.00 1
23172 Thiệp Gỗ Khắc Laser Tamy Beloved P 0 5.00 1
18747 Gối Vải Bông Maa, Được Làm Thủ Công, Chất Liệu Vải Bền Bỉ, Kháng Khuẩn Tốt, Không Bị Mốc, Dễ Dàng Vệ Sinh, Đem Đến Trải Nghiệm Êm Ái Hemp Oi P 0 5.00 3
49346 Bịt Mắt Lụa Nhiều Màu, Bịt Mắt Ngủ Lụa, Miếng Che Mắt Ngủ Lụa, Bịt Mắt Ngủ Cao Cấp, Che Mắt Chặn Ánh Sáng ÓNG heartmadeinvietnam P 0 5.00 6
2151 Ví Vòng To Hoa Văn Batik Nhuộm Chàm Sáp Ong, Hoa Văn H’mông, Ví Chia Ngăn Tiện Dụng, Đựng Được Nhiều Đồ Hoa Tiến Brocade P 0 5.00 4
6105 Trà Kombucha Bụp Giấm, Vị Mọng Chua Ngọt, Tốt Cho Tiêu Hóa, Thức Uống Bổ Dưỡng, Quà Tặng Yêu Thích Rượu, Lên Men Tự Nhiên Hở buôn chà P 0 5.00 1
287 Khăn Tay Linen Hồng Thêu Tay, Chất Liệu Linen Tự Nhiên, Đa Dụng và Thời Trang, Thêu Hoa Thủ Công, Quà Tặng Ý Nghĩa Bông Bay Bay P 0 5.00 1
5261 Trà Hoa Đậu Biếc, Túi Zip 10g, Trà An Thần, Trà Ngủ Ngon, Thảo Mộc Thiên Nhiên, Gói Dùng Thử Là Nhiên P 0 4.95 20
40811 Hộp Cacao Detox, Thanh Lọc Cơ Thể, Cải Thiện Cân Nặng, Chống Lão Hóa, Giúp Ngủ Ngon, Không Chứa Chất Bảo Quản Cacao Mi P 0 5.00 2
2163 Khăn Lụa Đơn Sắc Vàng, Khăn Lụa Đơn Sắc Thanh Lịch Nền Nã, Khăn Lụa Tơ Tằm Mềm Mịn, Quà Tặng Người Thân Hoa Tiến Brocade P 0 5.00 4