SELECT 
  cscart_products.product_id, 
  cscart_products.product_code, 
  cscart_products.status, 
  cscart_products.company_id, 
  cscart_products.list_price, 
  cscart_products.shipping_params, 
  cscart_product_review_prepared_data.average_rating, 
  cscart_product_descriptions.product, 
  cscart_product_descriptions.short_description, 
  cscart_product_descriptions.full_description, 
  cscart_product_descriptions.promo_text, 
  IFNULL(
    avg(opr.rating_value), 
    3
  ) as actual_rating, 
  cd.category, 
  cd.category_id, 
  cc.category_id as main_category, 
  pvd.variant_id, 
  pvd.variant, 
  MIN(
    IF(
      cscart_product_prices.percentage_discount = 0, 
      cscart_product_prices.price, 
      cscart_product_prices.price - (
        cscart_product_prices.price * cscart_product_prices.percentage_discount
      )/ 100
    )
  ) as price 
FROM 
  cscart_products 
  LEFT JOIN cscart_product_prices ON cscart_product_prices.product_id = cscart_products.product_id 
  AND cscart_product_prices.lower_limit = 1 
  AND cscart_product_prices.usergroup_id IN (0) 
  LEFT JOIN cscart_product_descriptions ON cscart_product_descriptions.product_id = cscart_products.product_id 
  LEFT JOIN cscart_product_review_prepared_data ON cscart_product_review_prepared_data.product_id = cscart_products.product_id 
  left join cscart_product_reviews opr on opr.product_id = cscart_products.product_id 
  and opr.status = "A" 
  left join cscart_product_features_values pfv on pfv.product_id = cscart_products.product_id 
  AND pfv.feature_id = 62 
  left join cscart_product_feature_variant_descriptions pvd on pvd.variant_id = pfv.variant_id 
  inner join cscart_products_categories pc on pc.product_id = cscart_products.product_id 
  inner join cscart_categories cc on cc.category_id = pc.category_id 
  and pc.link_type = "M" 
  inner join cscart_category_descriptions cd on cd.category_id = cc.parent_id 
  AND cscart_product_descriptions.lang_code = 'en' 
WHERE 
  cscart_products.product_id = 3963

Query time 0.00534

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "1276988.33"
    },
    "nested_loop": [
      {
        "table": {
          "table_name": "cscart_products",
          "access_type": "const",
          "possible_keys": [
            "PRIMARY"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "product_id"
          ],
          "key_length": "3",
          "ref": [
            "const"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 1,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "0.00",
            "eval_cost": "0.10",
            "prefix_cost": "0.00",
            "data_read_per_join": "5K"
          },
          "used_columns": [
            "product_id",
            "product_code",
            "status",
            "company_id",
            "list_price",
            "shipping_params"
          ]
        }
      },
      {
        "table": {
          "table_name": "cscart_product_prices",
          "access_type": "const",
          "possible_keys": [
            "usergroup",
            "product_id",
            "lower_limit",
            "usergroup_id",
            "idx_product_prices_usergroup_limit"
          ],
          "key": "usergroup",
          "used_key_parts": [
            "product_id",
            "usergroup_id",
            "lower_limit"
          ],
          "key_length": "9",
          "ref": [
            "const",
            "const",
            "const"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 1,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "0.00",
            "eval_cost": "0.10",
            "prefix_cost": "0.00",
            "data_read_per_join": "24"
          },
          "used_columns": [
            "product_id",
            "price",
            "percentage_discount",
            "lower_limit",
            "usergroup_id"
          ]
        }
      },
      {
        "table": {
          "table_name": "cscart_product_descriptions",
          "access_type": "const",
          "possible_keys": [
            "PRIMARY",
            "product_id"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "product_id",
            "lang_code"
          ],
          "key_length": "9",
          "ref": [
            "const",
            "const"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 1,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "0.00",
            "eval_cost": "0.10",
            "prefix_cost": "0.00",
            "data_read_per_join": "4K"
          },
          "used_columns": [
            "product_id",
            "lang_code",
            "product",
            "short_description",
            "full_description",
            "promo_text"
          ]
        }
      },
      {
        "table": {
          "table_name": "pc",
          "access_type": "ref",
          "possible_keys": [
            "PRIMARY",
            "link_type",
            "pt"
          ],
          "key": "pt",
          "used_key_parts": [
            "product_id",
            "link_type"
          ],
          "key_length": "6",
          "ref": [
            "const",
            "const"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 1,
          "filtered": "100.00",
          "using_index": true,
          "cost_info": {
            "read_cost": "0.39",
            "eval_cost": "0.10",
            "prefix_cost": "0.49",
            "data_read_per_join": "16"
          },
          "used_columns": [
            "product_id",
            "category_id",
            "link_type"
          ]
        }
      },
      {
        "table": {
          "table_name": "cc",
          "access_type": "eq_ref",
          "possible_keys": [
            "PRIMARY",
            "parent",
            "p_category_id"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "category_id"
          ],
          "key_length": "3",
          "ref": [
            "cscart_db.pc.category_id"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 1,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "0.25",
            "eval_cost": "0.10",
            "prefix_cost": "0.84",
            "data_read_per_join": "2K"
          },
          "used_columns": [
            "category_id",
            "parent_id"
          ]
        }
      },
      {
        "table": {
          "table_name": "cscart_product_review_prepared_data",
          "access_type": "ref",
          "possible_keys": [
            "PRIMARY"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "product_id"
          ],
          "key_length": "3",
          "ref": [
            "const"
          ],
          "rows_examined_per_scan": 2,
          "rows_produced_per_join": 2,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "0.50",
            "eval_cost": "0.20",
            "prefix_cost": "1.54",
            "data_read_per_join": "32"
          },
          "used_columns": [
            "product_id",
            "average_rating"
          ]
        }
      },
      {
        "table": {
          "table_name": "opr",
          "access_type": "ref",
          "possible_keys": [
            "idx_product_id"
          ],
          "key": "idx_product_id",
          "used_key_parts": [
            "product_id"
          ],
          "key_length": "3",
          "ref": [
            "const"
          ],
          "rows_examined_per_scan": 232,
          "rows_produced_per_join": 464,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "116.00",
            "eval_cost": "46.40",
            "prefix_cost": "163.94",
            "data_read_per_join": "757K"
          },
          "used_columns": [
            "product_id",
            "rating_value",
            "status"
          ],
          "attached_condition": "<if>(is_not_null_compl(opr), (`cscart_db`.`opr`.`status` = 'A'), true)"
        }
      },
      {
        "table": {
          "table_name": "pfv",
          "access_type": "ref",
          "possible_keys": [
            "PRIMARY",
            "fl",
            "product_id",
            "fpl",
            "idx_product_feature_variant_id"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "feature_id",
            "product_id"
          ],
          "key_length": "6",
          "ref": [
            "const",
            "const"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 464,
          "filtered": "100.00",
          "using_index": true,
          "cost_info": {
            "read_cost": "314.00",
            "eval_cost": "46.40",
            "prefix_cost": "524.33",
            "data_read_per_join": "358K"
          },
          "used_columns": [
            "feature_id",
            "product_id",
            "variant_id"
          ]
        }
      },
      {
        "table": {
          "table_name": "cd",
          "access_type": "ref",
          "possible_keys": [
            "PRIMARY"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "category_id"
          ],
          "key_length": "3",
          "ref": [
            "cscart_db.cc.parent_id"
          ],
          "rows_examined_per_scan": 15,
          "rows_produced_per_join": 6960,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "1740.00",
            "eval_cost": "696.00",
            "prefix_cost": "2960.33",
            "data_read_per_join": "20M"
          },
          "used_columns": [
            "category_id",
            "category"
          ]
        }
      },
      {
        "table": {
          "table_name": "pvd",
          "access_type": "ref",
          "possible_keys": [
            "PRIMARY"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "variant_id"
          ],
          "key_length": "3",
          "ref": [
            "cscart_db.pfv.variant_id"
          ],
          "rows_examined_per_scan": 523,
          "rows_produced_per_join": 3640080,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "910020.00",
            "eval_cost": "364008.00",
            "prefix_cost": "1276988.33",
            "data_read_per_join": "25G"
          },
          "used_columns": [
            "variant_id",
            "variant"
          ]
        }
      }
    ]
  }
}

Result

product_id product_code status company_id list_price shipping_params average_rating product short_description full_description promo_text actual_rating category category_id main_category variant_id variant price
3963 CR007 A 13 1650.00 a:5:{s:16:"min_items_in_box";i:0;s:16:"max_items_in_box";i:0;s:10:"box_length";i:0;s:9:"box_width";i:0;s:10:"box_height";i:0;} 4.84 Advanced Snail 92 All In One Cream Face Moisturiser | 100ml <p>Deeply hydrates, calms breakouts, and restores skin barrier.</p> <p>COSRX Advanced Snail 92 All In One Cream — 100ml | Buy Genuine Korean Moisturizer in India</p> <p>Unlock the secret to hydrated, healthy, and glowing skin with the cult-favorite COSRX Advanced Snail 92 All In One Cream. Packed with an extraordinary 92% snail mucin and hyaluronic acid, this lightweight gel-cream deeply nourishes, repairs, and restores your skin barrier with every use. Trusted worldwide and now available online for Indian skincare lovers, this innovative formula:</p> <ul><li>Intensely hydrates: Delivers lasting moisture without heaviness, keeping skin soft and plump all day.</li><li>Repairs and soothes: Snail mucin supports your skin’s natural healing, fades scars, calms redness, and helps restore a smooth, even texture.</li><li>Fights signs of aging: Improves elasticity, minimizes fine lines and wrinkles, and enhances overall skin firmness for a youthful glow.</li><li>Targets multiple concerns: Ideal for dry, oily, sensitive, acne-prone, or dull skin — perfect for India’s diverse climate.</li><li>Clean, cruelty-free: Fragrance-free, dermatologist-tested, and 100% cruelty-free.</li></ul> <p>Key Ingredients:</p> <ul><li>Snail Secretion Filtrate (92%)</li><li>Sodium Hyaluronate (Hyaluronic Acid)</li><li>Betaine, Panthenol, Arginine</li><li>Free from parabens, artificial color, and fragrances</li></ul> <p>Why Indian Customers Love It:<br />“My skin looks glowy, feels bouncy, and my acne scars are visibly lighter. Non-sticky and perfect for humid weather!”<br />“The only moisturizer that truly hydrates and repairs without causing breakouts.”</p> <p>Shop with Confidence:</p> <ul><li>100% Authentic, fresh stock shipped pan-India rapidly</li><li>Exclusive offers and discounts at checkout</li><li>Customer support for all queries</li></ul> <p></p> 4.8408 Moisturisers 2705 2811 10451 COSRX 990.000000