SELECT 
  cscart_products.*, 
  cscart_product_descriptions.*, 
  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, 
  GROUP_CONCAT(
    CASE WHEN (
      cscart_products_categories.link_type = 'M'
    ) THEN CONCAT(
      cscart_products_categories.category_id, 
      'M'
    ) ELSE cscart_products_categories.category_id END 
    ORDER BY 
      cscart_categories.storefront_id IN (0, 1) DESC, 
      (
        cscart_products_categories.link_type = 'M'
      ) DESC, 
      cscart_products_categories.category_position ASC, 
      cscart_products_categories.category_id ASC
  ) as category_ids, 
  popularity.total as popularity, 
  IF(
    shared_prices.product_id IS NOT NULL, 
    MIN(
      IF(
        shared_prices.percentage_discount = 0, 
        shared_prices.price, 
        shared_prices.price - (
          shared_prices.price * shared_prices.percentage_discount
        )/ 100
      )
    ), 
    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, 
  companies.company as company_name, 
  cscart_product_sales.amount as sales_amount, 
  cscart_seo_names.name as seo_name, 
  cscart_seo_names.path as seo_path, 
  cscart_discussion.type as discussion_type 
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, 0, 1) 
  LEFT JOIN cscart_product_descriptions ON cscart_product_descriptions.product_id = cscart_products.product_id 
  AND cscart_product_descriptions.lang_code = 'fr' 
  LEFT JOIN cscart_ult_product_prices shared_prices ON shared_prices.product_id = cscart_products.product_id 
  AND shared_prices.company_id = 1 
  AND shared_prices.lower_limit = 1 
  AND shared_prices.usergroup_id IN (0, 0, 1) 
  LEFT JOIN cscart_companies as companies ON companies.company_id = cscart_products.company_id 
  INNER JOIN cscart_products_categories ON cscart_products_categories.product_id = cscart_products.product_id 
  INNER JOIN cscart_categories ON cscart_categories.category_id = cscart_products_categories.category_id 
  AND cscart_categories.storefront_id IN (0, 1) 
  AND (
    cscart_categories.usergroup_ids = '' 
    OR FIND_IN_SET(
      0, cscart_categories.usergroup_ids
    ) 
    OR FIND_IN_SET(
      1, cscart_categories.usergroup_ids
    )
  ) 
  AND (
    cscart_products.usergroup_ids = '' 
    OR FIND_IN_SET(
      0, cscart_products.usergroup_ids
    ) 
    OR FIND_IN_SET(
      1, cscart_products.usergroup_ids
    )
  ) 
  AND cscart_categories.status IN ('A', 'H') 
  AND cscart_products.status IN ('A', 'H') 
  LEFT JOIN cscart_product_popularity as popularity ON popularity.product_id = cscart_products.product_id 
  LEFT JOIN cscart_product_sales ON cscart_product_sales.product_id = cscart_products.product_id 
  AND cscart_product_sales.category_id = 451 
  LEFT JOIN cscart_seo_names ON cscart_seo_names.object_id = 10741 
  AND cscart_seo_names.type = 'p' 
  AND cscart_seo_names.dispatch = '' 
  AND cscart_seo_names.lang_code = 'fr' 
  AND cscart_seo_names.company_id = 1 
  LEFT JOIN cscart_discussion ON cscart_discussion.object_id = cscart_products.product_id 
  AND cscart_discussion.object_type = 'P' 
  AND cscart_discussion.company_id = 1 
WHERE 
  cscart_products.product_id = 10741 
  AND (
    companies.status IN ('A') 
    OR cscart_products.company_id = 0
  ) 
GROUP BY 
  cscart_products.product_id

Query time 0.00407

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "14.58"
    },
    "grouping_operation": {
      "using_filesort": false,
      "nested_loop": [
        {
          "table": {
            "table_name": "cscart_products",
            "access_type": "const",
            "possible_keys": [
              "PRIMARY",
              "status"
            ],
            "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.20",
              "prefix_cost": "0.00",
              "data_read_per_join": "3K"
            },
            "used_columns": [
              "product_id",
              "product_code",
              "product_type",
              "owner_id",
              "status",
              "list_price",
              "amount",
              "weight",
              "length",
              "width",
              "height",
              "shipping_freight",
              "low_avail_limit",
              "timestamp",
              "is_edp",
              "edp_shipping",
              "unlimited_download",
              "tracking",
              "free_shipping",
              "zero_price_action",
              "is_pbp",
              "is_op",
              "is_oper",
              "company_id",
              "is_returnable",
              "return_period",
              "avail_since",
              "localization",
              "min_qty",
              "max_qty",
              "qty_step",
              "list_qty_count",
              "tax_ids",
              "age_verification",
              "age_limit",
              "usergroup_ids",
              "options_type",
              "exceptions_type",
              "details_layout",
              "shipping_params",
              "out_of_stock_actions",
              "updated_timestamp",
              "facebook_obj_type",
              "parent_product_id"
            ]
          }
        },
        {
          "table": {
            "table_name": "popularity",
            "access_type": "const",
            "possible_keys": [
              "PRIMARY",
              "total"
            ],
            "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.20",
              "prefix_cost": "0.00",
              "data_read_per_join": "32"
            },
            "used_columns": [
              "product_id",
              "total"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_product_sales",
            "access_type": "const",
            "possible_keys": [
              "PRIMARY",
              "pa"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "category_id",
              "product_id"
            ],
            "key_length": "6",
            "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.20",
              "prefix_cost": "0.00",
              "data_read_per_join": "16"
            },
            "used_columns": [
              "category_id",
              "product_id",
              "amount"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_product_prices",
            "access_type": "ref",
            "possible_keys": [
              "membership",
              "product_id",
              "lower_limit",
              "membership_id"
            ],
            "key": "product_id",
            "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": "1.00",
              "eval_cost": "0.20",
              "prefix_cost": "1.20",
              "data_read_per_join": "24"
            },
            "used_columns": [
              "product_id",
              "price",
              "lower_limit",
              "usergroup_id",
              "percentage_discount"
            ],
            "attached_condition": "<if>(is_not_null_compl(cscart_product_prices), ((`ea201_francemaqu`.`cscart_product_prices`.`lower_limit` = 1) and (`ea201_francemaqu`.`cscart_product_prices`.`usergroup_id` in (0,0,1))), true)"
          }
        },
        {
          "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": "1.00",
              "eval_cost": "0.20",
              "prefix_cost": "2.40",
              "data_read_per_join": "3K"
            },
            "used_columns": [
              "product_id",
              "lang_code",
              "product",
              "shortname",
              "short_description",
              "full_description",
              "meta_keywords",
              "meta_description",
              "search_words",
              "page_title",
              "age_warning_message",
              "promo_text",
              "cls_stop_words"
            ]
          }
        },
        {
          "table": {
            "table_name": "shared_prices",
            "access_type": "ref",
            "possible_keys": [
              "usergroup",
              "product_id",
              "company_id",
              "lower_limit",
              "usergroup_id"
            ],
            "key": "product_id",
            "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": "1.00",
              "eval_cost": "0.20",
              "prefix_cost": "3.60",
              "data_read_per_join": "32"
            },
            "used_columns": [
              "product_id",
              "price",
              "percentage_discount",
              "lower_limit",
              "company_id",
              "usergroup_id"
            ],
            "attached_condition": "<if>(is_not_null_compl(shared_prices), ((`ea201_francemaqu`.`shared_prices`.`lower_limit` = 1) and (`ea201_francemaqu`.`shared_prices`.`company_id` = 1) and (`ea201_francemaqu`.`shared_prices`.`usergroup_id` in (0,0,1))), true)"
          }
        },
        {
          "table": {
            "table_name": "companies",
            "access_type": "const",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "company_id"
            ],
            "key_length": "4",
            "ref": [
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 1,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "1.00",
              "eval_cost": "0.20",
              "prefix_cost": "4.80",
              "data_read_per_join": "5K"
            },
            "used_columns": [
              "company_id",
              "status",
              "company"
            ],
            "attached_condition": "<if>(found_match(companies), ((`ea201_francemaqu`.`companies`.`status` = 'A') or 0), true)"
          }
        },
        {
          "table": {
            "table_name": "cscart_products_categories",
            "access_type": "ref",
            "possible_keys": [
              "PRIMARY",
              "pt"
            ],
            "key": "pt",
            "used_key_parts": [
              "product_id"
            ],
            "key_length": "3",
            "ref": [
              "const"
            ],
            "rows_examined_per_scan": 4,
            "rows_produced_per_join": 4,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "4.00",
              "eval_cost": "0.80",
              "prefix_cost": "9.60",
              "data_read_per_join": "64"
            },
            "used_columns": [
              "product_id",
              "category_id",
              "link_type",
              "category_position"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_categories",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY",
              "c_status",
              "p_category_id"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "category_id"
            ],
            "key_length": "3",
            "ref": [
              "ea201_francemaqu.cscart_products_categories.category_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 0,
            "filtered": "5.00",
            "cost_info": {
              "read_cost": "4.00",
              "eval_cost": "0.04",
              "prefix_cost": "14.40",
              "data_read_per_join": "534"
            },
            "used_columns": [
              "category_id",
              "usergroup_ids",
              "status",
              "storefront_id"
            ],
            "attached_condition": "((`ea201_francemaqu`.`cscart_categories`.`storefront_id` in (0,1)) and ((`ea201_francemaqu`.`cscart_categories`.`usergroup_ids` = '') or find_in_set(0,`ea201_francemaqu`.`cscart_categories`.`usergroup_ids`) or find_in_set(1,`ea201_francemaqu`.`cscart_categories`.`usergroup_ids`)) and (`ea201_francemaqu`.`cscart_categories`.`status` in ('A','H')))"
          }
        },
        {
          "table": {
            "table_name": "cscart_seo_names",
            "access_type": "const",
            "possible_keys": [
              "PRIMARY",
              "dispatch"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "object_id",
              "type",
              "dispatch",
              "lang_code",
              "company_id"
            ],
            "key_length": "210",
            "ref": [
              "const",
              "const",
              "const",
              "const",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 0,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.05",
              "eval_cost": "0.04",
              "prefix_cost": "14.49",
              "data_read_per_join": "347"
            },
            "used_columns": [
              "name",
              "object_id",
              "type",
              "dispatch",
              "lang_code",
              "company_id",
              "path"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_discussion",
            "access_type": "const",
            "possible_keys": [
              "object_id",
              "company_id"
            ],
            "key": "object_id",
            "used_key_parts": [
              "object_id",
              "object_type",
              "company_id"
            ],
            "key_length": "10",
            "ref": [
              "const",
              "const",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 0,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.05",
              "eval_cost": "0.04",
              "prefix_cost": "14.58",
              "data_read_per_join": "4"
            },
            "used_columns": [
              "object_id",
              "object_type",
              "type",
              "company_id"
            ]
          }
        }
      ]
    }
  }
}

Result

product_id product_code product_type owner_id status list_price amount weight length width height shipping_freight low_avail_limit timestamp is_edp edp_shipping unlimited_download tracking free_shipping zero_price_action is_pbp is_op is_oper company_id is_returnable return_period avail_since localization min_qty max_qty qty_step list_qty_count tax_ids age_verification age_limit usergroup_ids options_type exceptions_type details_layout shipping_params out_of_stock_actions updated_timestamp facebook_obj_type parent_product_id lang_code product shortname short_description full_description meta_keywords meta_description search_words page_title age_warning_message promo_text cls_stop_words price category_ids popularity company_name sales_amount seo_name seo_path discussion_type
10741 REV-00251 P 0 A 0.00 4 0.000 0 0 0 0.00 0 1698938222 N N N B N R N N N 1 Y 10 0 0 0 0 0 6 N 0 0 P F default 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;} S 1711542988 activity 0 fr Puzzle 3D Navette spatiale Discovery - Revell 251 Puzzle 3D facile à monter sans colle ni peinture pour les enfants à partir de 8 ans : Navette spatiale Discovery - Revell 251 <h2>Maquette espace - Puzzle 3D Navette spatiale Discovery - Revell 251</h2> <h3>Puzzle d'un vaisseau spatial facile à monter pour modéliste débutant</h3> <p><strong>Contenu du coffret Revell :</strong></p> <ul> <li>1 x Puzzle 3D Navette spatiale Discovery</li> <li>Notice de montage</li> </ul> <p><strong>Information sur le modèle de navette spatiale représentée par ce puzzle 3D Revell facile à monter :</strong></p> <p>La maquette de la navette spatiale Discovery de Revell est bien plus qu'un simple puzzle 3D, c'est une aventure dans l'espace que les jeunes et les moins jeunes peuvent apprécier. Facile à monter sans avoir besoin de colle ni de peinture, cette maquette est idéale pour les enfants à partir de 8 ans et offre une expérience éducative passionnante.</p> <p>En assemblant les pièces de cette navette spatiale emblématique, les enfants découvrent non seulement les merveilles de l'exploration spatiale, mais ils développent également leur patience, leur coordination œil-main et leur pensée logique. Les détails authentiques de la navette, de la soute à cargaison au cockpit, ajoutent une touche d'authenticité à cette expérience.</p> <p>Que ce soit pour l'apprentissage, le jeu ou la décoration, cette maquette de la navette spatiale Discovery garantit des heures de plaisir interstellaire pour les jeunes astronautes en herbe et les passionnés de l'espace.</p> <div class="tab-content"> <div id="description" class="tab-pane active"> <div> </div> </div> </div> puzzle 3D revell, maquette revell, maquette Navette spatiale Discovery Puzzle 3D facile à monter sans colle ni peinture pour les enfants à partir de 8 ans : Navette spatiale Discovery - Revell 251 Revell 251, Revell 251, maquette Navette spatiale Discovery Revell 251 - Maquette Puzzle 3D Navette spatiale Discovery 29.70000000 451M,112,32,119 3464 France Maquette 8 puzzle-3d-tour-eiffel-revell-111-clone 451 B