SELECT 
  a.variant_id, 
  a.option_id, 
  a.position, 
  a.modifier, 
  a.modifier_type, 
  a.weight_modifier, 
  a.weight_modifier_type, 
  a.nav_skus, 
  a.commercial_modifier, 
  a.commercial_dn, 
  a.same_as_option, 
  a.price_overrides, 
  a.base_cost, 
  b.variant_name, 
  IF(
    shared_option_variants.variant_id IS NOT NULL, 
    shared_option_variants.modifier, 
    a.modifier
  ) as modifier, 
  IF(
    shared_option_variants.variant_id IS NOT NULL, 
    shared_option_variants.modifier_type, 
    a.modifier_type
  ) as modifier_type 
FROM 
  cscart_product_option_variants as a 
  LEFT JOIN cscart_product_option_variants_descriptions as b ON a.variant_id = b.variant_id 
  AND b.lang_code = 'en' 
  LEFT JOIN cscart_ult_product_option_variants shared_option_variants ON shared_option_variants.variant_id = a.variant_id 
  AND shared_option_variants.company_id = 1 
WHERE 
  a.option_id IN (
    22785, 22772, 22773, 22774, 22786, 22776, 
    22779, 22780, 22782, 22783, 22784, 
    22397
  ) 
  AND a.status = 'A' 
ORDER BY 
  a.position, 
  a.variant_id

Query time 0.00236

JSON explain

{
  "query_block": {
    "select_id": 1,
    "table": {
      "table_name": "shared_option_variants",
      "access_type": "system",
      "possible_keys": ["PRIMARY", "company_id"],
      "rows": 0,
      "filtered": 0,
      "const_row_not_found": true
    },
    "read_sorted_file": {
      "filesort": {
        "sort_key": "a.position, a.variant_id",
        "table": {
          "table_name": "a",
          "access_type": "range",
          "possible_keys": ["option_id", "option_id_2", "status"],
          "key": "option_id",
          "key_length": "6",
          "used_key_parts": ["option_id", "status"],
          "rows": 192,
          "filtered": 100,
          "index_condition": "a.option_id in (22785,22772,22773,22774,22786,22776,22779,22780,22782,22783,22784,22397) and a.`status` = 'A'"
        }
      }
    },
    "table": {
      "table_name": "b",
      "access_type": "eq_ref",
      "possible_keys": ["PRIMARY"],
      "key": "PRIMARY",
      "key_length": "9",
      "used_key_parts": ["variant_id", "lang_code"],
      "ref": ["cscart_migrate.a.variant_id", "const"],
      "rows": 1,
      "filtered": 100,
      "attached_condition": "trigcond(b.lang_code = 'en')"
    }
  }
}

Result

variant_id option_id position modifier modifier_type weight_modifier weight_modifier_type nav_skus commercial_modifier commercial_dn same_as_option price_overrides base_cost variant_name
221146 22397 0 0.000 A 0.000 A skip 0.00 0.00 0 0.00 Please Select
226174 22772 0 0.000 A 0.000 A skip 0.00 0.00 0 0.00 Please Select
226175 22773 0 0.000 A 0.000 A skip 0.00 0.00 0 0.00 Please Select
226210 22774 0 0.000 A 0.000 A skip 0.00 0.00 0 0.00 Please Select
226218 22776 0 0.000 A 0.000 A skip 0.00 0.00 0 0.00 Please Select
226229 22779 0 0.000 A 0.000 A skip 0.00 0.00 0 0.00 Please Select
226260 22780 0 0.000 A 0.000 A skip 0.00 0.00 0 0.00 Please Select
226270 22782 0 0.000 A 0.000 A skip 0.00 0.00 0 0.00 Please Select
226275 22783 0 0.000 A 0.000 A skip 0.00 0.00 0 0.00 Please Select
226280 22784 0 0.000 A 0.000 A skip 0.00 0.00 0 0.00 Please Select
226281 22785 0 0.000 A 0.000 A unselected 0.00 0.00 0 0.00 Please Select
226316 22786 0 0.000 A 0.000 A skip 0.00 0.00 0 0.00 Please Select
226139 22772 3 0.000 A 0.000 A 100 0.00 0.00 0 0.00 100-Black
226179 22774 3 0.000 A 0.000 A 0.00 0.00 22772 0.00 Same as Shade
226230 22780 3 0.000 A 0.000 A 100 0.00 0.00 0 0.00 100-Black
226266 22782 3 0.000 A 0.000 A NA 0.00 0.00 0 0.00 None
226271 22783 3 0.000 A 0.000 A NA 0.00 0.00 0 0.00 None
226276 22784 3 0.000 A 0.000 A NA 0.00 0.00 0 0.00 None
221147 22397 5 0.000 A 0.000 A E26 0.00 0.00 0 0.00 Standard Incandescent
226140 22772 5 0.000 A 0.000 A 105 0.00 0.00 0 0.00 105-Textured Black
226176 22773 5 0.000 A 0.000 A 12 0.00 0.00 0 0.00 12" Arm
226180 22774 5 0.000 A 0.000 A 100 0.00 0.00 0 0.00 100-Black
226219 22776 5 0.000 A 0.000 A 0.00 0.00 0 0.00 None
226227 22779 5 0.000 A 0.000 A NA 0.00 0.00 0 0.00 None
226231 22780 5 0.000 A 0.000 A 105 0.00 0.00 0 0.00 105-Textured Black
226267 22782 5 43.000 A 0.000 A DBPC 0.00 0.00 0 0.00 Decorative BP Cover
226274 22783 5 110.000 A 0.000 A DBPC 0.00 0.00 0 0.00 Copper BP Cover
226279 22784 5 110.000 A 0.000 A DBPC 0.00 0.00 0 0.00 Brass BP Cover
226283 22785 5 0.000 A 0.000 A 2ASE10-G55 0.00 0.00 0 0.00 10" Shade
226286 22786 5 0.000 A 0.000 A 100 0.00 0.00 0 0.00 100-Black
221148 22397 10 27.000 A 0.000 A GU24 0.00 0.00 0 1.45 GU24
226141 22772 10 0.000 A 0.000 A 200 0.00 0.00 0 0.00 200-White
226177 22773 10 13.000 A 0.000 A 24 0.00 0.00 0 0.00 24" Arm
226181 22774 10 0.000 A 0.000 A 105 0.00 0.00 0 0.00 105-Textured Black
226220 22776 10 71.000 A 0.000 A SWK 0.00 0.00 0 0.00 Swivel Knuckle
226228 22779 10 97.000 A 0.000 A WC 0.00 0.00 0 0.00 Wire Cage
226232 22780 10 0.000 A 0.000 A 200 0.00 0.00 0 0.00 200-White
226268 22782 10 92.000 A 0.000 A DD 0.00 0.00 0 0.00 Dusk-to-Dawn Photocell
226272 22783 10 202.000 A 0.000 A DD 0.00 0.00 0 0.00 Dusk-to-Dawn Photocell
226277 22784 10 202.000 A 0.000 A DD 0.00 0.00 0 0.00 Dusk-to-Dawn Photocell
226284 22785 10 71.000 A 0.000 A 2ASE12-G55 0.00 0.00 0 0.00 12" Shade
226287 22786 10 0.000 A 0.000 A 105 0.00 0.00 0 0.00 105-Textured Black
226142 22772 15 0.000 A 0.000 A 300 0.00 0.00 0 0.00 300-Dark Green
226178 22773 15 24.000 A 0.000 A 36 0.00 0.00 0 0.00 36" Arm
226182 22774 15 0.000 A 0.000 A 200 0.00 0.00 0 0.00 200-White
226233 22780 15 0.000 A 0.000 A 300 0.00 0.00 0 0.00 300-Dark Green
226269 22782 15 83.000 A 0.000 A HDBP 0.00 0.00 0 0.00 Heavy Duty BP
226273 22783 15 83.000 A 0.000 A HDBP 0.00 0.00 0 0.00 Heavy Duty BP
226278 22784 15 83.000 A 0.000 A HDBP 0.00 0.00 0 0.00 Heavy Duty BP
226285 22785 15 105.000 A 0.000 A 2ASE14-G55 0.00 0.00 0 0.00 14" Shade
226288 22786 15 0.000 A 0.000 A 200 0.00 0.00 0 0.00 200-White
226143 22772 20 0.000 A 0.000 A 975 0.00 0.00 0 0.00 975-Galvanized
226183 22774 20 0.000 A 0.000 A 300 0.00 0.00 0 0.00 300-Dark Green
226234 22780 20 0.000 A 0.000 A 975 0.00 0.00 0 0.00 975-Galvanized
226289 22786 20 0.000 A 0.000 A 300 0.00 0.00 0 0.00 300-Dark Green
226144 22772 25 0.000 A 0.000 A 605 0.00 0.00 0 0.00 605-Textured Rust
226184 22774 25 0.000 A 0.000 A 975 0.00 0.00 0 0.00 975-Galvanized
226235 22780 25 0.000 A 0.000 A 605 0.00 0.00 0 0.00 605-Textured Rust
226290 22786 25 0.000 A 0.000 A 975 0.00 0.00 0 0.00 975-Galvanized
237232 22780 27 11.000 A 0.000 A 106 0.00 0.00 0 0.00 106-Matte Black
237236 22772 27 18.000 A 0.000 A 106 0.00 0.00 0 0.00 106-Matte Black
226204 22774 28 0.000 A 0.000 A 980 0.00 0.00 0 0.00 980-Brushed Aluminum
226310 22786 28 0.000 A 0.000 A 980 0.00 0.00 0 0.00 980-Brushed Aluminum
237233 22780 28 11.000 A 0.000 A 206 0.00 0.00 0 0.00 206-Matte White
237237 22772 28 18.000 A 0.000 A 206 0.00 0.00 0 0.00 206-Matte White
226145 22772 30 18.000 A 0.000 A 307 0.00 0.00 0 0.00 307-Emerald Green
226185 22774 30 0.000 A 0.000 A 605 0.00 0.00 0 0.00 605-Textured Rust
226236 22780 30 11.000 A 0.000 A 307 0.00 0.00 0 0.00 307-Emerald Green
226291 22786 30 0.000 A 0.000 A 605 0.00 0.00 0 0.00 605-Textured Rust
226165 22772 32 18.000 A 0.000 A 311 0.00 0.00 0 0.00 311-Jadite
226256 22780 32 11.000 A 0.000 A 311 0.00 0.00 0 0.00 311-Seafoam
237228 22786 32 11.000 A 0.000 A 106 0.00 0.00 0 0.00 106-Matte Black
237230 22774 32 11.000 A 0.000 A 106 0.00 0.00 0 0.00 106-Matte Black
237229 22786 33 11.000 A 0.000 A 206 0.00 0.00 0 0.00 206-Matte White
237231 22774 33 11.000 A 0.000 A 206 0.00 0.00 0 0.00 206-Matte White
241161 22772 33 18.000 A 0.000 A 320 0.00 0.00 0 0.00 320-Fern Green
242014 22780 33 11.000 A 0.000 A 320 0.00 0.00 0 0.00 320-Fern Green
226146 22772 35 18.000 A 0.000 A 370 0.00 0.00 0 0.00 370-Mint
226186 22774 35 11.000 A 0.000 A 307 0.00 0.00 0 0.00 307-Emerald Green
226237 22780 35 11.000 A 0.000 A 370 0.00 0.00 0 0.00 370-Mint
226292 22786 35 11.000 A 0.000 A 307 0.00 0.00 0 0.00 307-Emerald Green
226211 22774 36 11.000 A 0.000 A 311 0.00 0.00 0 0.00 311-Jadite
226317 22786 37 11.000 A 0.000 A 311 0.00 0.00 0 0.00 311-Jadite
241166 22774 38 11.000 A 0.000 A 320 0.00 0.00 0 0.00 320-Fern Green
241176 22786 38 11.000 A 0.000 A 320 0.00 0.00 0 0.00 320-Fern Green
226147 22772 40 18.000 A 0.000 A 380 0.00 0.00 0 0.00 380-Chartreuse
226187 22774 40 11.000 A 0.000 A 370 0.00 0.00 0 0.00 370-Mint
226238 22780 40 11.000 A 0.000 A 380 0.00 0.00 0 0.00 380-Chartreuse
226293 22786 40 11.000 A 0.000 A 370 0.00 0.00 0 0.00 370-Mint
226148 22772 45 18.000 A 0.000 A 390 0.00 0.00 0 0.00 390-Teal
226188 22774 45 11.000 A 0.000 A 380 0.00 0.00 0 0.00 380-Chartreuse
226239 22780 45 11.000 A 0.000 A 390 0.00 0.00 0 0.00 390-Teal
226294 22786 45 11.000 A 0.000 A 380 0.00 0.00 0 0.00 380-Chartreuse
226149 22772 50 18.000 A 0.000 A 400 0.00 0.00 0 0.00 400-Barn Red
226189 22774 50 11.000 A 0.000 A 390 0.00 0.00 0 0.00 390-Teal
226240 22780 50 11.000 A 0.000 A 400 0.00 0.00 0 0.00 400-Barn Red
226295 22786 50 11.000 A 0.000 A 390 0.00 0.00 0 0.00 390-Teal
226150 22772 55 18.000 A 0.000 A 420 0.00 0.00 0 0.00 420-Orange
226190 22774 55 11.000 A 0.000 A 400 0.00 0.00 0 0.00 400-Barn Red
226241 22780 55 11.000 A 0.000 A 420 0.00 0.00 0 0.00 420-Orange
226296 22786 55 11.000 A 0.000 A 400 0.00 0.00 0 0.00 400-Barn Red
241162 22772 58 18.000 A 0.000 A 430 0.00 0.00 0 0.00 430-Soft Clay
242015 22780 58 11.000 A 0.000 A 430 0.00 0.00 0 0.00 430-Soft Clay
226151 22772 60 18.000 A 0.000 A 470 0.00 0.00 0 0.00 470-Watermelon
226191 22774 60 11.000 A 0.000 A 420 0.00 0.00 0 0.00 420-Orange
226242 22780 60 11.000 A 0.000 A 470 0.00 0.00 0 0.00 470-Watermelon
226297 22786 60 11.000 A 0.000 A 420 0.00 0.00 0 0.00 420-Orange
241167 22774 63 11.000 A 0.000 A 430 0.00 0.00 0 0.00 430-Soft Clay
241177 22786 63 11.000 A 0.000 A 430 0.00 0.00 0 0.00 430-Soft Clay
226152 22772 65 18.000 A 0.000 A 480 0.00 0.00 0 0.00 480-Blush Pink
226192 22774 65 11.000 A 0.000 A 470 0.00 0.00 0 0.00 470-Watermelon
226243 22780 65 11.000 A 0.000 A 480 0.00 0.00 0 0.00 480-Blush Pink
226298 22786 65 11.000 A 0.000 A 470 0.00 0.00 0 0.00 470-Watermelon
226153 22772 70 18.000 A 0.000 A 490 0.00 0.00 0 0.00 490-Magenta
226193 22774 70 11.000 A 0.000 A 480 0.00 0.00 0 0.00 480-Blush Pink
226244 22780 70 11.000 A 0.000 A 490 0.00 0.00 0 0.00 490-Magenta
226299 22786 70 11.000 A 0.000 A 480 0.00 0.00 0 0.00 480-Blush Pink
226154 22772 75 18.000 A 0.000 A 495 0.00 0.00 0 0.00 495-Sherbet Orange
226194 22774 75 11.000 A 0.000 A 490 0.00 0.00 0 0.00 490-Magenta
226245 22780 75 11.000 A 0.000 A 495 0.00 0.00 0 0.00 495-Sherbet Orange
226300 22786 75 11.000 A 0.000 A 490 0.00 0.00 0 0.00 490-Magenta
226155 22772 80 18.000 A 0.000 A 500 0.00 0.00 0 0.00 500-Buttery Yellow
226195 22774 80 11.000 A 0.000 A 495 0.00 0.00 0 0.00 495-Sherbet Orange
226246 22780 80 11.000 A 0.000 A 500 0.00 0.00 0 0.00 500-Buttery Yellow
226301 22786 80 11.000 A 0.000 A 495 0.00 0.00 0 0.00 495-Sherbet Orange
226156 22772 85 18.000 A 0.000 A 570 0.00 0.00 0 0.00 570-Sunflower
226196 22774 85 11.000 A 0.000 A 500 0.00 0.00 0 0.00 500-Buttery Yellow
226247 22780 85 11.000 A 0.000 A 570 0.00 0.00 0 0.00 570-Sunflower
226302 22786 85 11.000 A 0.000 A 500 0.00 0.00 0 0.00 500-Buttery Yellow
226157 22772 90 18.000 A 0.000 A 600 0.00 0.00 0 0.00 600-Bronze
226197 22774 90 11.000 A 0.000 A 570 0.00 0.00 0 0.00 570-Sunflower
226248 22780 90 11.000 A 0.000 A 600 0.00 0.00 0 0.00 600-Bronze
226303 22786 90 11.000 A 0.000 A 570 0.00 0.00 0 0.00 570-Sunflower
226158 22772 95 18.000 A 0.000 A 601 0.00 0.00 0 0.00 601-Chocolate
226198 22774 95 11.000 A 0.000 A 600 0.00 0.00 0 0.00 600-Bronze
226249 22780 95 11.000 A 0.000 A 601 0.00 0.00 0 0.00 601-Chocolate
226304 22786 95 11.000 A 0.000 A 600 0.00 0.00 0 0.00 600-Bronze
241163 22772 98 18.000 A 0.000 A 607 0.00 0.00 0 0.00 607-Taupe
242016 22780 98 11.000 A 0.000 A 607 0.00 0.00 0 0.00 607-Taupe
226159 22772 100 18.000 A 0.000 A 615 0.00 0.00 0 0.00 615-Oil-Rubbed Bronze
226199 22774 100 11.000 A 0.000 A 601 0.00 0.00 0 0.00 601-Chocolate
226250 22780 100 11.000 A 0.000 A 615 0.00 0.00 0 0.00 615-Oil-Rubbed Bronze
226305 22786 100 11.000 A 0.000 A 601 0.00 0.00 0 0.00 601-Chocolate
241164 22772 103 18.000 A 0.000 A 630 0.00 0.00 0 0.00 630-Beige
241168 22774 103 11.000 A 0.000 A 607 0.00 0.00 0 0.00 607-Taupe
241178 22786 103 11.000 A 0.000 A 607 0.00 0.00 0 0.00 607-Taupe
226160 22772 105 18.000 A 0.000 A 700 0.00 0.00 0 0.00 700-Royal Blue
226200 22774 105 11.000 A 0.000 A 615 0.00 0.00 0 0.00 615-Oil-Rubbed Bronze
226306 22786 105 11.000 A 0.000 A 615 0.00 0.00 0 0.00 615-Oil-Rubbed Bronze
242017 22780 105 11.000 A 0.000 A 630 0.00 0.00 0 0.00 630-Beige
241169 22774 108 11.000 A 0.000 A 630 0.00 0.00 0 0.00 630-Beige
241179 22786 108 11.000 A 0.000 A 630 0.00 0.00 0 0.00 630-Beige
226161 22772 110 18.000 A 0.000 A 705 0.00 0.00 0 0.00 705-Navy
226201 22774 110 11.000 A 0.000 A 700 0.00 0.00 0 0.00 700-Royal Blue
226251 22780 110 11.000 A 0.000 A 700 0.00 0.00 0 0.00 700-Royal Blue
226307 22786 110 11.000 A 0.000 A 700 0.00 0.00 0 0.00 700-Royal Blue
245154 22772 112 18.000 A 0.000 A 710 0.00 0.00 0 0.00 710-Cobalt Blue
226167 22772 113 18.000 A 0.000 A 715 0.00 0.00 0 0.00 715-Delphite Blue
226162 22772 115 18.000 A 0.000 A 790 0.00 0.00 0 0.00 790-Lavender
226202 22774 115 11.000 A 0.000 A 705 0.00 0.00 0 0.00 705-Navy
226252 22780 115 11.000 A 0.000 A 705 0.00 0.00 0 0.00 705-Navy
226308 22786 115 11.000 A 0.000 A 705 0.00 0.00 0 0.00 705-Navy
245156 22774 116 11.000 A 0.000 A 710 0.00 0.00 0 0.00 710-Cobalt Blue
245158 22786 116 11.000 A 0.000 A 710 0.00 0.00 0 0.00 710-Cobalt Blue
226213 22774 118 11.000 A 0.000 A 715 0.00 0.00 0 0.00 715-Delphite Blue
226319 22786 118 11.000 A 0.000 A 715 0.00 0.00 0 0.00 715-Delphite Blue
242125 22774 119 11.000 A 0.000 A 800 0.00 0.00 0 0.00 800-Industrial Grey
242126 22786 119 11.000 A 0.000 A 800 0.00 0.00 0 0.00 800-Industrial Grey
226163 22772 120 18.000 A 0.000 A 800 0.00 0.00 0 0.00 800-Industrial Grey
226203 22774 120 11.000 A 0.000 A 805 0.00 0.00 0 0.00 805-Charcoal Granite
226253 22780 120 11.000 A 0.000 A 790 0.00 0.00 0 0.00 790-Lavender
226309 22786 120 11.000 A 0.000 A 805 0.00 0.00 0 0.00 805-Charcoal Granite
245157 22774 122 11.000 A 0.000 A 810 0.00 0.00 0 0.00 810-Graphite
241170 22774 123 11.000 A 0.000 A 815 0.00 0.00 0 0.00 815-Light Grey
245159 22786 123 11.000 A 0.000 A 810 0.00 0.00 0 0.00 810-Graphite
226164 22772 125 18.000 A 0.000 A 805 0.00 0.00 0 0.00 805-Charcoal Granite
226254 22780 125 11.000 A 0.000 A 800 0.00 0.00 0 0.00 800-Industrial Grey
241180 22786 125 11.000 A 0.000 A 815 0.00 0.00 0 0.00 815-Light Grey
245155 22772 126 18.000 A 0.000 A 810 0.00 0.00 0 0.00 810-Graphite
241165 22772 128 18.000 A 0.000 A 815 0.00 0.00 0 0.00 815-Light Grey
226255 22780 130 11.000 A 0.000 A 805 0.00 0.00 0 0.00 805-Charcoal Granite
242018 22780 133 11.000 A 0.000 A 815 0.00 0.00 0 0.00 815-Light Grey
226258 22780 145 11.000 A 0.000 A 715 0.00 0.00 0 0.00 715-Sky Blue
226169 22772 150 139.000 A 0.000 A 995 0.00 0.00 0 0.00 995-Raw Copper
226208 22774 150 93.000 A 0.000 A 997 0.00 0.00 0 0.00 997-Raw Brass
226314 22786 150 93.000 A 0.000 A 997 0.00 0.00 0 0.00 997-Raw Brass
226170 22772 155 197.000 A 0.000 A 996 0.00 0.00 0 0.00 996-Weathered Copper
226209 22774 155 93.000 A 0.000 A 998 0.00 0.00 0 0.00 998-Weathered Brass
226315 22786 155 93.000 A 0.000 A 998 0.00 0.00 0 0.00 998-Weathered Brass
226171 22772 160 203.000 A 0.000 A 999 0.00 0.00 0 0.00 999-Oil-Rubbed Copper
226172 22772 165 208.000 A 0.000 A 997 0.00 0.00 0 0.00 997-Raw Brass
226173 22772 170 215.000 A 0.000 A 998 0.00 0.00 0 0.00 998-Weathered Brass