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, 
  company_descr.i18n_company as company_name, 
  companies.ec_rfq_whatsapp_number, 
  companies.ec_rfq_phone_number, 
  companies.ec_rfq_bhf, 
  companies.ec_rfq_bht, 
  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, 
  cscart_product_review_prepared_data.average_rating average_rating, 
  cscart_product_review_prepared_data.reviews_count product_reviews_count, 
  cscart_ec_table_booking_system.booking_type as booking_type, 
  cscart_ec_table_booking_system.from_date as from_date, 
  cscart_ec_table_booking_system.to_date as to_date, 
  cscart_ec_table_booking_system.slot_time as slot_time, 
  cscart_ec_table_booking_system.free_time as free_time, 
  cscart_ec_table_booking_system.days_data as days_data, 
  cscart_ec_table_booking_system.quantity_selector as quantity_selector, 
  cscart_ec_table_booking_system.show_price_date as show_price_date, 
  cscart_ec_table_booking_system.blocked_date as blocked_date, 
  cscart_ec_table_booking_system.minimum_booking_time as minimum_booking_time 
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 = 'en' 
  LEFT JOIN cscart_company_descriptions as company_descr ON company_descr.company_id = cscart_products.company_id 
  AND company_descr.lang_code = 'en' 
  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 = 9386 
  LEFT JOIN cscart_seo_names ON cscart_seo_names.object_id = 427786 
  AND cscart_seo_names.type = 'p' 
  AND cscart_seo_names.dispatch = '' 
  AND cscart_seo_names.lang_code = 'en' 
  LEFT JOIN cscart_discussion ON cscart_discussion.object_id = cscart_products.product_id 
  AND cscart_discussion.object_type = 'P' 
  LEFT JOIN cscart_product_review_prepared_data ON cscart_product_review_prepared_data.product_id = cscart_products.product_id 
  AND cscart_product_review_prepared_data.storefront_id = 0 
  LEFT JOIN cscart_ec_table_booking_system ON cscart_ec_table_booking_system.product_id = cscart_products.product_id 
  AND cscart_ec_table_booking_system.product_id = 427786 
WHERE 
  cscart_products.product_id = 427786 
  AND (
    companies.status IN ('A') 
    OR cscart_products.company_id = 0
  ) 
GROUP BY 
  cscart_products.product_id

Query time 0.00183

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "12.54"
    },
    "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": "7K"
            },
            "used_columns": [
              "product_id",
              "product_code",
              "product_type",
              "status",
              "company_id",
              "list_price",
              "amount",
              "weight",
              "length",
              "width",
              "height",
              "shipping_freight",
              "low_avail_limit",
              "timestamp",
              "updated_timestamp",
              "usergroup_ids",
              "is_edp",
              "edp_shipping",
              "unlimited_download",
              "tracking",
              "free_shipping",
              "zero_price_action",
              "is_pbp",
              "is_op",
              "is_oper",
              "is_returnable",
              "return_period",
              "avail_since",
              "out_of_stock_actions",
              "localization",
              "min_qty",
              "max_qty",
              "qty_step",
              "list_qty_count",
              "tax_ids",
              "age_verification",
              "age_limit",
              "options_type",
              "exceptions_type",
              "details_layout",
              "shipping_params",
              "facebook_obj_type",
              "parent_product_id",
              "buy_now_url",
              "master_product_id",
              "master_product_status",
              "master_product_offers_count",
              "prestashop_product_id",
              "prestashop_account_id",
              "prestashop_is_parent",
              "amz_condition",
              "amz_condition_note",
              "amz_product_id",
              "amz_product_id_type",
              "transfer_price",
              "tax_value",
              "ebay_template_id",
              "product_hash",
              "ebay_price",
              "package_type",
              "ebay_status",
              "ebay_override_price",
              "subscription_product",
              "interval",
              "interval_count",
              "ec_rfq_product_type",
              "ec_rfq_service_options"
            ]
          }
        },
        {
          "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": 0,
            "rows_produced_per_join": 1,
            "filtered": "0.00",
            "unique_row_not_found": true,
            "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": "range",
            "possible_keys": [
              "usergroup",
              "product_id",
              "lower_limit",
              "usergroup_id"
            ],
            "key": "usergroup",
            "used_key_parts": [
              "product_id",
              "usergroup_id",
              "lower_limit"
            ],
            "key_length": "9",
            "rows_examined_per_scan": 2,
            "rows_produced_per_join": 2,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "2.00",
              "eval_cost": "0.40",
              "prefix_cost": "2.40",
              "data_read_per_join": "128"
            },
            "used_columns": [
              "product_id",
              "price",
              "percentage_discount",
              "lower_limit",
              "usergroup_id"
            ],
            "attached_condition": "(<if>(found_match(cscart_product_prices), 1, true) and <if>(is_not_null_compl(cscart_product_prices), ((`webmarco`.`cscart_product_prices`.`lower_limit` = 1) and (`webmarco`.`cscart_product_prices`.`product_id` = 427786) and (`webmarco`.`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": 2,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.00",
              "eval_cost": "0.40",
              "prefix_cost": "2.80",
              "data_read_per_join": "13K"
            },
            "used_columns": [
              "product_id",
              "lang_code",
              "product",
              "shortname",
              "ab__spt_short_name",
              "short_description",
              "full_description",
              "meta_keywords",
              "meta_description",
              "search_words",
              "page_title",
              "age_warning_message",
              "promo_text",
              "ab__custom_product_h1",
              "ebay_title",
              "ebay_description",
              "override",
              "cls_stop_words",
              "ec_rfq_request_btn_text"
            ]
          }
        },
        {
          "table": {
            "table_name": "company_descr",
            "access_type": "const",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "company_id",
              "lang_code"
            ],
            "key_length": "10",
            "ref": [
              "const",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 2,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.00",
              "eval_cost": "0.40",
              "prefix_cost": "3.20",
              "data_read_per_join": "7K"
            },
            "used_columns": [
              "company_id",
              "lang_code",
              "i18n_company"
            ]
          }
        },
        {
          "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": 2,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.00",
              "eval_cost": "0.40",
              "prefix_cost": "3.60",
              "data_read_per_join": "19K"
            },
            "used_columns": [
              "company_id",
              "status",
              "ec_rfq_whatsapp_number",
              "ec_rfq_phone_number",
              "ec_rfq_bhf",
              "ec_rfq_bht"
            ],
            "attached_condition": "<if>(found_match(companies), ((`webmarco`.`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": 3,
            "rows_produced_per_join": 6,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "6.00",
              "eval_cost": "1.20",
              "prefix_cost": "10.80",
              "data_read_per_join": "96"
            },
            "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": [
              "webmarco.cscart_products_categories.category_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 0,
            "filtered": "5.00",
            "cost_info": {
              "read_cost": "0.00",
              "eval_cost": "0.06",
              "prefix_cost": "12.00",
              "data_read_per_join": "1K"
            },
            "used_columns": [
              "category_id",
              "usergroup_ids",
              "status",
              "storefront_id"
            ],
            "attached_condition": "((`webmarco`.`cscart_categories`.`storefront_id` in (0,1)) and ((`webmarco`.`cscart_categories`.`usergroup_ids` = '') or find_in_set(0,`webmarco`.`cscart_categories`.`usergroup_ids`) or find_in_set(1,`webmarco`.`cscart_categories`.`usergroup_ids`)) and (`webmarco`.`cscart_categories`.`status` in ('A','H')))"
          }
        },
        {
          "table": {
            "table_name": "cscart_seo_names",
            "access_type": "ref",
            "possible_keys": [
              "PRIMARY",
              "dispatch"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "object_id",
              "type",
              "dispatch",
              "lang_code"
            ],
            "key_length": "206",
            "ref": [
              "const",
              "const",
              "const",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 0,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.30",
              "eval_cost": "0.06",
              "prefix_cost": "12.36",
              "data_read_per_join": "520"
            },
            "used_columns": [
              "name",
              "object_id",
              "type",
              "dispatch",
              "path",
              "lang_code"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_discussion",
            "access_type": "const",
            "possible_keys": [
              "object_id"
            ],
            "key": "object_id",
            "used_key_parts": [
              "object_id",
              "object_type"
            ],
            "key_length": "6",
            "ref": [
              "const",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 0,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.00",
              "eval_cost": "0.06",
              "prefix_cost": "12.42",
              "data_read_per_join": "7"
            },
            "used_columns": [
              "object_id",
              "object_type",
              "type"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_product_review_prepared_data",
            "access_type": "const",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "product_id",
              "storefront_id"
            ],
            "key_length": "7",
            "ref": [
              "const",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 0,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.00",
              "eval_cost": "0.06",
              "prefix_cost": "12.48",
              "data_read_per_join": "4"
            },
            "used_columns": [
              "product_id",
              "storefront_id",
              "average_rating",
              "reviews_count"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_ec_table_booking_system",
            "access_type": "const",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "product_id"
            ],
            "key_length": "4",
            "ref": [
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 0,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.00",
              "eval_cost": "0.06",
              "prefix_cost": "12.54",
              "data_read_per_join": "52"
            },
            "used_columns": [
              "product_id",
              "booking_type",
              "quantity_selector",
              "show_price_date",
              "blocked_date",
              "from_date",
              "to_date",
              "slot_time",
              "free_time",
              "days_data",
              "minimum_booking_time"
            ],
            "attached_condition": "<if>(is_not_null_compl(cscart_ec_table_booking_system), <cache>((427786 = 427786)), true)"
          }
        }
      ]
    }
  }
}

Result

product_id product_code product_type status company_id list_price amount weight length width height shipping_freight low_avail_limit timestamp updated_timestamp usergroup_ids is_edp edp_shipping unlimited_download tracking free_shipping zero_price_action is_pbp is_op is_oper is_returnable return_period avail_since out_of_stock_actions localization min_qty max_qty qty_step list_qty_count tax_ids age_verification age_limit options_type exceptions_type details_layout shipping_params facebook_obj_type parent_product_id buy_now_url master_product_id master_product_status master_product_offers_count prestashop_product_id prestashop_account_id prestashop_is_parent amz_condition amz_condition_note amz_product_id amz_product_id_type transfer_price tax_value ebay_template_id product_hash ebay_price package_type ebay_status ebay_override_price subscription_product interval interval_count ec_rfq_product_type ec_rfq_service_options lang_code product shortname ab__spt_short_name short_description full_description meta_keywords meta_description search_words page_title age_warning_message promo_text ab__custom_product_h1 ebay_title ebay_description override cls_stop_words ec_rfq_request_btn_text price category_ids popularity company_name ec_rfq_whatsapp_number ec_rfq_phone_number ec_rfq_bhf ec_rfq_bht sales_amount seo_name seo_path discussion_type average_rating product_reviews_count booking_type from_date to_date slot_time free_time days_data quantity_selector show_price_date blocked_date minimum_booking_time
427786 WM1852MQ P A 707 16.18 1 0.000 0 0 0 0.00 0 1688211662 1688211670 0 N N N B N R N N N Y 10 0 N 0 0 0 0 N 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;} activity 0 0 A 0 0 0 Y 0.00 0.00 0 1767954989 Letter N N day P en Ventilator de masa Timeless Tools cu USB, plug & play <p><font style="vertical-align:inherit;"><font style="vertical-align:inherit;">Ventilator de masa Timeless Tools cu USB, plug & play</font></font></p><p><font style="vertical-align:inherit;"><font style="vertical-align:inherit;">Ventilator de masa, USB   </font></font><br /><font style="vertical-align:inherit;"><font style="vertical-align:inherit;">- silentios  </font></font><br /><font style="vertical-align:inherit;"><font style="vertical-align:inherit;">- usor de instalat plug & play  </font></font><br /><font style="vertical-align:inherit;"><font style="vertical-align:inherit;">- reglabil la 360° in pozitia optima  </font></font><br /><font style="vertical-align:inherit;"><font style="vertical-align:inherit;">- functioneaza prin USB, nu necesita alimentare externa  </font></font><br /><font style="vertical-align:inherit;"><font style="vertical-align:inherit;">- paletele sunt din aluminiu, durabile  </font></font><br /><font style="vertical-align:inherit;"><font style="vertical-align:inherit;">- ideal pentru: laptop, computere, powerbank, notebook </font></font></p> <p>                </p> <p><font style="vertical-align:inherit;"><font style="vertical-align:inherit;">Ventilatoarele sunt de cele mai multe ori accesorii de baza ale zilelor de vara. </font><font style="vertical-align:inherit;">In caldura torid ofera in mod placut improspatare si misca aerul din incaperi contribuind totodata la o aerisire mai rapida cand geamurile sunt deschise. </font><font style="vertical-align:inherit;">Daca lucrezi la birou, studiezi sau stai mult timp la masa, te obosesti mult mai usor, simti ca ti se lipesc pleoapele de somn de la caldura si in incaperile unde este un aer inchis. </font><font style="vertical-align:inherit;">Ventilatorul de birou il poti conecta prin USB la laptop si il poti amplasa oriunde in preajma ta, pentru a simti mereu pe fata mangaierea placuta, revigoranta, racoritoare a brizei create prin miscarea continua a aerului. </font><font style="vertical-align:inherit;">Deoarece aparatul are unghi reglabil, il poti ajusta in asa fel incat adierea sa fie la o inaltime ideala atat pentru tine cat si pentru colegi. </font></font></p> <p>                </p> <p><font style="vertical-align:inherit;"><font style="vertical-align:inherit;">Parametrii tehnici:  </font></font><br /><font style="vertical-align:inherit;"><font style="vertical-align:inherit;">- Dimensiunile ventilatorului: 15 x 14 x 8,5 cm  </font></font><br /><font style="vertical-align:inherit;"><font style="vertical-align:inherit;">- Diametru: 9,6 cm  </font></font><br /><font style="vertical-align:inherit;"><font style="vertical-align:inherit;">- Putere: 2.5 ± 0.25W   </font></font><br /><font style="vertical-align:inherit;"><font style="vertical-align:inherit;">- Tensiune: DC 5 V  </font></font><br /><font style="vertical-align:inherit;"><font style="vertical-align:inherit;">- Lungimea cablului: aprox. </font><font style="vertical-align:inherit;">68 cm </font></font></p> <p><font style="vertical-align:inherit;"><font style="vertical-align:inherit;">Atentie! </font><font style="vertical-align:inherit;">A nu se lasa la indemana copiilor! </font><font style="vertical-align:inherit;">Nu atinge dispozitivul dacă ai mainile umede (transpirate, unse proaspat cu creme de protectie solara). </font><font style="vertical-align:inherit;">Ai grija sa nu fie in contact cu apa. </font><font style="vertical-align:inherit;">Nu expune produsul in lumina directa a soarelui. </font><font style="vertical-align:inherit;">Nu poate fi utilizat langa combustibili, diluanti sau alti solventi organici. </font></font></p> <p><font style="vertical-align:inherit;"><font style="vertical-align:inherit;">Greutatea pachetului: 0,18 kg  </font></font><br /><font style="vertical-align:inherit;"><font style="vertical-align:inherit;">Dimensiunile pachetului: 15 x 15 x 15 cm</font></font></p> 10.11000000 6809,2910 23914 1001produse.ro ventilator-de-masa-timeless-tools-cu-usb-plug-and-play 2910/2912/2917/2954/9386 B