SELECT 
  products.*, 
  product_descriptions.*, 
  MIN(
    IF(
      product_prices.percentage_discount = 0, 
      product_prices.price, 
      product_prices.price - (
        product_prices.price * product_prices.percentage_discount
      )/ 100
    )
  ) as price, 
  GROUP_CONCAT(
    CASE WHEN (
      products_categories.link_type = 'M'
    ) THEN CONCAT(
      products_categories.category_id, 
      'M'
    ) ELSE products_categories.category_id END 
    ORDER BY 
      categories.storefront_id IN (0, 1) DESC, 
      (
        products_categories.link_type = 'M'
      ) DESC, 
      products_categories.category_position ASC, 
      products_categories.category_id ASC
  ) as category_ids, 
  popularity.total as popularity, 
  company_descr.i18n_company as company_name, 
  cd.terms, 
  seo_names.name as seo_name, 
  seo_names.path as seo_path, 
  company_descriptions.company_description, 
  discussion.type as discussion_type 
FROM 
  products 
  LEFT JOIN product_prices ON product_prices.product_id = products.product_id 
  AND product_prices.lower_limit = 1 
  AND product_prices.usergroup_id IN (0, 0, 1) 
  LEFT JOIN product_descriptions ON product_descriptions.product_id = products.product_id 
  AND product_descriptions.lang_code = 'en' 
  LEFT JOIN company_descriptions as company_descr ON company_descr.company_id = products.company_id 
  AND company_descr.lang_code = 'en' 
  LEFT JOIN companies as companies ON companies.company_id = products.company_id 
  INNER JOIN products_categories ON products_categories.product_id = products.product_id 
  INNER JOIN categories ON categories.category_id = products_categories.category_id 
  AND categories.storefront_id IN (0, 1) 
  AND (
    categories.usergroup_ids = '' 
    OR FIND_IN_SET(0, categories.usergroup_ids) 
    OR FIND_IN_SET(1, categories.usergroup_ids)
  ) 
  AND (
    products.usergroup_ids = '' 
    OR FIND_IN_SET(0, products.usergroup_ids) 
    OR FIND_IN_SET(1, products.usergroup_ids)
  ) 
  AND categories.status IN ('A', 'H') 
  AND products.status IN ('A', 'H') 
  LEFT JOIN product_popularity as popularity ON popularity.product_id = products.product_id 
  LEFT JOIN company_descriptions AS cd ON cd.company_id = products.company_id 
  AND cd.lang_code = 'en' 
  LEFT JOIN seo_names ON seo_names.object_id = 285027 
  AND seo_names.type = 'p' 
  AND seo_names.dispatch = '' 
  AND seo_names.lang_code = 'en' 
  LEFT JOIN company_descriptions AS company_descriptions ON company_descriptions.company_id = products.company_id 
  AND company_descriptions.lang_code = 'en' 
  LEFT JOIN discussion ON discussion.object_id = products.product_id 
  AND discussion.object_type = 'P' 
WHERE 
  products.product_id = 285027 
  AND (
    companies.status IN ('A') 
    OR products.company_id = 0
  ) 
GROUP BY 
  products.product_id

Query time 0.00258

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "5.40"
    },
    "grouping_operation": {
      "using_filesort": false,
      "nested_loop": [
        {
          "table": {
            "table_name": "products",
            "access_type": "const",
            "possible_keys": [
              "PRIMARY",
              "status",
              "idx_company_id",
              "idx_usergroup_ids"
            ],
            "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": "4K"
            },
            "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",
              "weight_lbs",
              "weight_oz",
              "product_tax_code",
              "deleted_at",
              "archived_at",
              "position"
            ]
          }
        },
        {
          "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.10",
              "prefix_cost": "0.00",
              "data_read_per_join": "32"
            },
            "used_columns": [
              "product_id",
              "total"
            ]
          }
        },
        {
          "table": {
            "table_name": "cd",
            "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": 1,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.00",
              "eval_cost": "0.10",
              "prefix_cost": "0.00",
              "data_read_per_join": "1K"
            },
            "used_columns": [
              "company_id",
              "lang_code",
              "terms"
            ]
          }
        },
        {
          "table": {
            "table_name": "product_prices",
            "access_type": "ref",
            "possible_keys": [
              "usergroup",
              "product_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": "0.47",
              "eval_cost": "0.10",
              "prefix_cost": "0.57",
              "data_read_per_join": "24"
            },
            "used_columns": [
              "product_id",
              "price",
              "percentage_discount",
              "lower_limit",
              "usergroup_id"
            ],
            "attached_condition": "<if>(is_not_null_compl(product_prices), ((`goimagine`.`product_prices`.`lower_limit` = 1) and (`goimagine`.`product_prices`.`usergroup_id` in (0,0,1))), true)"
          }
        },
        {
          "table": {
            "table_name": "product_descriptions",
            "access_type": "const",
            "possible_keys": [
              "PRIMARY",
              "product_id"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "product_id",
              "lang_code"
            ],
            "key_length": "11",
            "ref": [
              "const",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 1,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.63",
              "eval_cost": "0.10",
              "prefix_cost": "1.29",
              "data_read_per_join": "5K"
            },
            "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",
              "how_its_made",
              "custom_header"
            ]
          }
        },
        {
          "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": 1,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.86",
              "eval_cost": "0.10",
              "prefix_cost": "2.26",
              "data_read_per_join": "1K"
            },
            "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": 1,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.68",
              "eval_cost": "0.10",
              "prefix_cost": "3.04",
              "data_read_per_join": "14K"
            },
            "used_columns": [
              "company_id",
              "status"
            ],
            "attached_condition": "<if>(found_match(companies), ((`goimagine`.`companies`.`status` = 'A') or false), true)"
          }
        },
        {
          "table": {
            "table_name": "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": 3,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.75",
              "eval_cost": "0.30",
              "prefix_cost": "4.09",
              "data_read_per_join": "48"
            },
            "used_columns": [
              "product_id",
              "category_id",
              "link_type",
              "category_position"
            ]
          }
        },
        {
          "table": {
            "table_name": "categories",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY",
              "c_status",
              "p_category_id"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "category_id"
            ],
            "key_length": "3",
            "ref": [
              "goimagine.products_categories.category_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 0,
            "filtered": "5.00",
            "cost_info": {
              "read_cost": "0.75",
              "eval_cost": "0.02",
              "prefix_cost": "5.14",
              "data_read_per_join": "402"
            },
            "used_columns": [
              "category_id",
              "usergroup_ids",
              "status",
              "storefront_id"
            ],
            "attached_condition": "((`goimagine`.`categories`.`storefront_id` in (0,1)) and ((`goimagine`.`categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`goimagine`.`categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`goimagine`.`categories`.`usergroup_ids`))) and (`goimagine`.`categories`.`status` in ('A','H')))"
          }
        },
        {
          "table": {
            "table_name": "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.13",
              "eval_cost": "0.02",
              "prefix_cost": "5.29",
              "data_read_per_join": "260"
            },
            "used_columns": [
              "name",
              "object_id",
              "type",
              "dispatch",
              "path",
              "lang_code"
            ]
          }
        },
        {
          "table": {
            "table_name": "company_descriptions",
            "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": 0,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.04",
              "eval_cost": "0.02",
              "prefix_cost": "5.35",
              "data_read_per_join": "266"
            },
            "used_columns": [
              "company_id",
              "lang_code",
              "company_description"
            ]
          }
        },
        {
          "table": {
            "table_name": "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.04",
              "eval_cost": "0.02",
              "prefix_cost": "5.40",
              "data_read_per_join": "3"
            },
            "used_columns": [
              "object_id",
              "object_type",
              "type"
            ]
          }
        }
      ]
    }
  }
}

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 weight_lbs weight_oz product_tax_code deleted_at archived_at position lang_code product shortname short_description full_description meta_keywords meta_description search_words page_title age_warning_message promo_text cls_stop_words how_its_made custom_header price category_ids popularity company_name terms seo_name seo_path company_description discussion_type
285027 AQBD00227 P A 976 250.00 1 5.000 0 0 0 0.00 0 1676829088 1678222762 0 N N N B Y R N N N Y 10 0 N 0 0 0 0 N 0 P F 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;} 5.000 0.000 2147483647 en Spring Mountains on Canvas <p>Spring quilt on canvas</p> <p></p> <p>This fabric art quilt captures the essence of a picturesque spring landscape with its beautiful use of batiks and hand-dyed fabrics. The quilt features a field of springtime flowers and lush green foliage, evoking the freshness and vibrancy of the season.</p> <p>The artist has skillfully used a variety of batiks in shades of pink, yellow, and purple to create the feel of springtime flowers blooming in a field. The blending of colors and textures gives the quilt a rich, dimensional quality that draws the eye and invites closer inspection.</p> <p>The quilt is mounted on a 12" x 24" canvas and comes to you ready to hang. The overall effect is one of harmony and balance, with the beauty of nature being captured in a timeless and captivating way.</p> <p>This art quilt is sure to be a conversation piece no matter where you hang it, admired by anyone who appreciates the beauty of nature. Its size makes it perfect for adding a touch of color and life to any room, while its intricate details and stunning colors make it a work of art to be treasured for years to come.</p> <p></p> <p><b>Made with batiks and mounted on canvas, this original artwork comes to you ready to hang.</b> </p> <ul><li>12" x 24" </li><li>One of a kind</li><li>Ready to hang</li><li>Handmade by me</li><li>Mountain Landscape </li><li>Springtime in the mountains </li></ul> <p><br></p> art quilts, spring time, miniature quilt, fiber art, wall art In these trying times everyone needs to escape. Let my quilts take you someplace peaceful. Visit the mountains or the beach, wherever your happy place might be. Fiber Art Quilt, 12x 24 Canvas, Nature Art, Small Art Quilt, Spring Landscape Quilt, spring, Quilted Wall Hanging, Art Quilt on Canvas, Nature Themed Quilt, Nature Themed Art, Abstract Nature, Original, One of a kind, OOAK, Springtime art quilt on canvas <p>Thank you for stopping by! All art quilts ship in one business day.<br></p> <p>All of my art quilts are made with 100% cotton batiks. Why batiks? Every piece of batik fabric is a work of art in itself (See photo number #1). I love the freedom this gives me when creating. Batiks are created by first applying wax to portions of a piece of fabric. The fabric is then dyed and the wax removed. Most of the batiks I use are created on the island of Bali where they cure the dyed fabric in the tropical sunshine. Using these fabrics is like taking a tropical vacation without leaving home. :) </p> <p>I start each project by deciding my basic color scheme. I start pulling out fabric; always more than I will need. Chances are also about 100% that the final quilt will contain at least a few fabrics that were not in the original group. The quilt takes on a life of its own as I progress and each selection can change the direction of the quilt. I audition each fabric, and as you can see from the pictures a single piece of fabric can dramatically change the look of the quilt depending on which section of it I use. The three strips in the first picture are from one piece of fabric. </p> <p>Thread is also important to the final look of the quilt. I have a nice selection of variegated threads... OK, I admit I was kind of surprised how much I had when I got this new thread carousel and finally had all of it in one place. </p> <p> <br> <br> </p> <p></p> 250.00000000 212M,209,2589 888 Dawn Andersen Art <p><strong>Custom Orders <br></strong></p> <p>You can contact me directly by using the <strong>Contact the Maker</strong> button at the top of the page.</p> <p><strong>The basics<br></strong></p> <p>I have found that creating an original art quilt takes time. Plan on 5 - 6 weeks; more for larger sizes. The amount of detail will also add to the time it takes. I will have a better idea once we have discussed what you are looking for and will provide you with a time estimate and approximate start date.</p> <p>The largest size I can do as one panel/quilt is 40” square. Larger sizes will be broken up into multiple panels.</p> <p>Once we have talked and determined the details of your art quilt I will send you a quote spelling out the details of your order. Upon acceptance of that quote I will create a custom listing for you for the initial deposit. <strong>This deposit is non-refundable should you cancel the order.</strong> Changes or additions to the original quilt design (as described in the quote and deposit listing) may result in additional charges to you and will be due as part of the final payment. The final amount will be due upon completion of the quilt and before it is shipped.</p> <p><strong>Please note: Quilts that contain subject matter that is so specific to you that they can't be sold to anyone else will require a 100% non-refundable deposit before work is started.</strong><br></p> <p><strong>Returns and exchanges</strong> </p> <p>I <b>do not</b> accept returns on <b>sale items and custom orders</b>. </p> <p>For all other items please contact me within 2 days of delivery.&nbsp; The item must be shipped back to me via Priority mail, or something comparable to how it was shipped to you, within 5 days of delivery. </p> <p><b>Conditions of return</b> </p> <p>Buyers are responsible for return shipping costs. If the item is not returned in its original condition, the buyer is responsible for any loss in value. Your refund will be issued once I have received your item(s) and determined their condition. <br></p> <p> <b>I want to hear from you</b>&nbsp; <br></p> <p>Please contact me if you have any questions or concerns and we can work together on a solution. <br></p> <p><br></p> <p><br></p> spring-mountains-on-canvas 4/100/212 <p><span class="display-block"></span><span class="display-block"></span><span class="display-block"></span></p> <p>Hello and welcome to my shop. I’m glad you stopped by. My name is Dawn and I have been creating in one form or another for more than 40 years.</p><p>I make home decor items such as candle mats and table runners. I also offer a wide variety of fun projects and can provide everything you need to make them. I love Christmas and offer lots of colorful items to make your home festive this holiday season.<br></p> <p>Recent 5 star reviews...</p> <p>"Absolutely loved! Packaged really well, instructions clear and great communication with the seller. Would buy again!"</p> <p></p> <p>"When I saw this print, I just could not pass it up!! I had some questions about sizes and the owner of this shop was very helpful and responded very quickly. It was shipped quickly and arrived in perfect condition. I have glass to fit my kitchen table, I used this round table topper in between the glass and the wood. It adds the perfect touch!!!"</p> <p></p> <p>"Beautiful!! I love the color combinations of the batik fabrics! Thanks for sharing your talent with others."<br></p> <p>"This is so nicely made. It is gorgeously composed and well-crafted with care and pride. Even the hanging hardware and label are perfectly done. Thank you! I am so happy with my beautiful purchase."</p> <p>"This is much more gorgeous than the pictures because of the delightful color combinations and particularly the delicate touches of orange. It is a perfect addition to my collection."</p> <p></p> <p><br></p> <p></p> <p><span class="display-block"><br></span></p> <p></p> D