SQL Analyzer


Explain Extended

ID Select Type Table Access Type Possible Keys Used Key Key Length Ref Rows Examined Filtered Extra
1 SIMPLE a ref idx,idx_goodsno,idx_tplSkin idx 24 const 1 100.00% Using index condition; Using where; Using temporary; Using filesort
1 SIMPLE b eq_ref PRIMARY PRIMARY 4 pravs.a.goodsno 1 100.00% Using where
1 SIMPLE c ref idx,ix_goodsno,idx_go_is_deleted,idx_goodsno_go_is_deleted_go_is_display,idx_goodsno_optno idx 4 pravs.a.goodsno 2 100.00% Using where
1 SIMPLE d eq_ref PRIMARY PRIMARY 4 pravs.b.brandno 1 100.00%

Original SQL Statement

select 
  *, 
  b.img_i img_s 
from 
  gd_goods_display a 
  left join gd_goods b on a.goodsno = b.goodsno 
  left join gd_goods_option c on a.goodsno = c.goodsno 
  and link 
  and go_is_deleted <> '1' 
  and go_is_display = '1' 
  left join gd_goods_brand d on b.brandno = d.sno 
where 
  a.mode = '2' 
  and b.open 
  and tplSkin = 'milanii' 
group by 
  b.goodsno 
order by 
  a.sort 
limit 
  100

Converted SQL Statement (MySQL Optimizer)

/* select#1 */
select 
  `pravs`.`a`.`no` AS `no`, 
  `pravs`.`a`.`goodsno` AS `goodsno`, 
  `pravs`.`a`.`mode` AS `mode`, 
  `pravs`.`a`.`sort` AS `sort`, 
  `pravs`.`a`.`tplSkin` AS `tplSkin`, 
  `pravs`.`b`.`goodsno` AS `goodsno`, 
  `pravs`.`b`.`goodsnm` AS `goodsnm`, 
  `pravs`.`b`.`meta_title` AS `meta_title`, 
  `pravs`.`b`.`goodscd` AS `goodscd`, 
  `pravs`.`b`.`origin` AS `origin`, 
  `pravs`.`b`.`maker` AS `maker`, 
  `pravs`.`b`.`brandno` AS `brandno`, 
  `pravs`.`b`.`tax` AS `tax`, 
  `pravs`.`b`.`delivery_type` AS `delivery_type`, 
  `pravs`.`b`.`keyword` AS `keyword`, 
  `pravs`.`b`.`strprice` AS `strprice`, 
  `pravs`.`b`.`shortdesc` AS `shortdesc`, 
  `pravs`.`b`.`longdesc` AS `longdesc`, 
  `pravs`.`b`.`mlongdesc` AS `mlongdesc`, 
  `pravs`.`b`.`img_i` AS `img_i`, 
  `pravs`.`b`.`img_s` AS `img_s`, 
  `pravs`.`b`.`img_m` AS `img_m`, 
  `pravs`.`b`.`img_l` AS `img_l`, 
  `pravs`.`b`.`img_mobile` AS `img_mobile`, 
  `pravs`.`b`.`use_mobile_img` AS `use_mobile_img`, 
  `pravs`.`b`.`img_w` AS `img_w`, 
  `pravs`.`b`.`img_x` AS `img_x`, 
  `pravs`.`b`.`img_y` AS `img_y`, 
  `pravs`.`b`.`img_z` AS `img_z`, 
  `pravs`.`b`.`img_pc_w` AS `img_pc_w`, 
  `pravs`.`b`.`img_pc_x` AS `img_pc_x`, 
  `pravs`.`b`.`img_pc_y` AS `img_pc_y`, 
  `pravs`.`b`.`img_pc_z` AS `img_pc_z`, 
  `pravs`.`b`.`memo` AS `memo`, 
  `pravs`.`b`.`regdt` AS `regdt`, 
  `pravs`.`b`.`icon` AS `icon`, 
  `pravs`.`b`.`open` AS `open`, 
  `pravs`.`b`.`runout` AS `runout`, 
  `pravs`.`b`.`optnm` AS `optnm`, 
  `pravs`.`b`.`opttype` AS `opttype`, 
  `pravs`.`b`.`opt1kind` AS `opt1kind`, 
  `pravs`.`b`.`opt2kind` AS `opt2kind`, 
  `pravs`.`b`.`addoptnm` AS `addoptnm`, 
  `pravs`.`b`.`ex_title` AS `ex_title`, 
  `pravs`.`b`.`ex1` AS `ex1`, 
  `pravs`.`b`.`ex2` AS `ex2`, 
  `pravs`.`b`.`ex3` AS `ex3`, 
  `pravs`.`b`.`ex4` AS `ex4`, 
  `pravs`.`b`.`ex5` AS `ex5`, 
  `pravs`.`b`.`ex6` AS `ex6`, 
  `pravs`.`b`.`relationis` AS `relationis`, 
  `pravs`.`b`.`relation` AS `relation`, 
  `pravs`.`b`.`usestock` AS `usestock`, 
  `pravs`.`b`.`totstock` AS `totstock`, 
  `pravs`.`b`.`useblog` AS `useblog`, 
  `pravs`.`b`.`launchdt` AS `launchdt`, 
  `pravs`.`b`.`inpk_dispno` AS `inpk_dispno`, 
  `pravs`.`b`.`inpk_prdno` AS `inpk_prdno`, 
  `pravs`.`b`.`inpk_regdt` AS `inpk_regdt`, 
  `pravs`.`b`.`inpk_moddt` AS `inpk_moddt`, 
  `pravs`.`b`.`goods_delivery` AS `goods_delivery`, 
  `pravs`.`b`.`use_emoney` AS `use_emoney`, 
  `pravs`.`b`.`min_ea` AS `min_ea`, 
  `pravs`.`b`.`max_ea` AS `max_ea`, 
  `pravs`.`b`.`updatedt` AS `updatedt`, 
  `pravs`.`b`.`open_mobile` AS `open_mobile`, 
  `pravs`.`b`.`detailView` AS `detailView`, 
  `pravs`.`b`.`todaygoods` AS `todaygoods`, 
  `pravs`.`b`.`use_stocked_noti` AS `use_stocked_noti`, 
  `pravs`.`b`.`extra_info` AS `extra_info`, 
  `pravs`.`b`.`color` AS `color`, 
  `pravs`.`b`.`model_name` AS `model_name`, 
  `pravs`.`b`.`goods_status` AS `goods_status`, 
  `pravs`.`b`.`goods_price` AS `goods_price`, 
  `pravs`.`b`.`goods_supply` AS `goods_supply`, 
  `pravs`.`b`.`goods_consumer` AS `goods_consumer`, 
  `pravs`.`b`.`provider_price` AS `provider_price`, 
  `pravs`.`b`.`use_option` AS `use_option`, 
  `pravs`.`b`.`option_name` AS `option_name`, 
  `pravs`.`b`.`sales_unit` AS `sales_unit`, 
  `pravs`.`b`.`use_goods_discount` AS `use_goods_discount`, 
  `pravs`.`b`.`manufacture_date` AS `manufacture_date`, 
  `pravs`.`b`.`effective_date_start` AS `effective_date_start`, 
  `pravs`.`b`.`effective_date_end` AS `effective_date_end`, 
  `pravs`.`b`.`use_only_adult` AS `use_only_adult`, 
  `pravs`.`b`.`use_external_video` AS `use_external_video`, 
  `pravs`.`b`.`external_video_url` AS `external_video_url`, 
  `pravs`.`b`.`external_video_width` AS `external_video_width`, 
  `pravs`.`b`.`external_video_size_type` AS `external_video_size_type`, 
  `pravs`.`b`.`external_video_height` AS `external_video_height`, 
  `pravs`.`b`.`exclude_member_discount` AS `exclude_member_discount`, 
  `pravs`.`b`.`exclude_member_reserve` AS `exclude_member_reserve`, 
  `pravs`.`b`.`goods_reserve` AS `goods_reserve`, 
  `pravs`.`b`.`option_value` AS `option_value`, 
  `pravs`.`b`.`delivery_method` AS `delivery_method`, 
  `pravs`.`b`.`delivery_area` AS `delivery_area`, 
  `pravs`.`b`.`image_attach_method` AS `image_attach_method`, 
  `pravs`.`b`.`trend_code` AS `trend_code`, 
  `pravs`.`b`.`buyable` AS `buyable`, 
  `pravs`.`b`.`buyable_member_group` AS `buyable_member_group`, 
  `pravs`.`b`.`sales_range_start` AS `sales_range_start`, 
  `pravs`.`b`.`sales_range_end` AS `sales_range_end`, 
  `pravs`.`b`.`speach_description_useyn` AS `speach_description_useyn`, 
  `pravs`.`b`.`speach_description` AS `speach_description`, 
  `pravs`.`b`.`naver_event` AS `naver_event`, 
  `pravs`.`b`.`naver_import_flag` AS `naver_import_flag`, 
  `pravs`.`b`.`naver_product_flag` AS `naver_product_flag`, 
  `pravs`.`b`.`naver_age_group` AS `naver_age_group`, 
  `pravs`.`b`.`naver_gender` AS `naver_gender`, 
  `pravs`.`b`.`naver_attribute` AS `naver_attribute`, 
  `pravs`.`b`.`naver_search_tag` AS `naver_search_tag`, 
  `pravs`.`b`.`naver_category` AS `naver_category`, 
  `pravs`.`b`.`naver_product_id` AS `naver_product_id`, 
  `pravs`.`b`.`naver_shopping_yn` AS `naver_shopping_yn`, 
  `pravs`.`b`.`naver_shopping_chk` AS `naver_shopping_chk`, 
  `pravs`.`b`.`naver_lprice` AS `naver_lprice`, 
  `pravs`.`b`.`seo_use` AS `seo_use`, 
  `pravs`.`b`.`seo_title` AS `seo_title`, 
  `pravs`.`b`.`seo_description` AS `seo_description`, 
  `pravs`.`b`.`seo_keywords` AS `seo_keywords`, 
  `pravs`.`b`.`seo_author` AS `seo_author`, 
  `pravs`.`b`.`use_facebook` AS `use_facebook`, 
  `pravs`.`b`.`img_facebook` AS `img_facebook`, 
  `pravs`.`b`.`facebook_image_attatch_method` AS `facebook_image_attatch_method`, 
  `pravs`.`b`.`culture_benefit` AS `culture_benefit`, 
  `pravs`.`b`.`daum_shopping_yn` AS `daum_shopping_yn`, 
  `pravs`.`c`.`sno` AS `sno`, 
  `pravs`.`c`.`goodsno` AS `goodsno`, 
  `pravs`.`c`.`opt1` AS `opt1`, 
  `pravs`.`c`.`opt2` AS `opt2`, 
  `pravs`.`c`.`price` AS `price`, 
  `pravs`.`c`.`consumer` AS `consumer`, 
  `pravs`.`c`.`supply` AS `supply`, 
  `pravs`.`c`.`reserve` AS `reserve`, 
  `pravs`.`c`.`stock` AS `stock`, 
  `pravs`.`c`.`opt1img` AS `opt1img`, 
  `pravs`.`c`.`opt1icon` AS `opt1icon`, 
  `pravs`.`c`.`opt2icon` AS `opt2icon`, 
  `pravs`.`c`.`link` AS `link`, 
  `pravs`.`c`.`optno` AS `optno`, 
  `pravs`.`c`.`pchsno` AS `pchsno`, 
  `pravs`.`c`.`go_is_deleted` AS `go_is_deleted`, 
  `pravs`.`c`.`go_is_display` AS `go_is_display`, 
  `pravs`.`c`.`go_sort` AS `go_sort`, 
  `pravs`.`d`.`sno` AS `sno`, 
  `pravs`.`d`.`brandnm` AS `brandnm`, 
  `pravs`.`d`.`brandnm_eng` AS `brandnm_eng`, 
  `pravs`.`d`.`keyword` AS `keyword`, 
  `pravs`.`d`.`subname` AS `subname`, 
  `pravs`.`d`.`sort` AS `sort`, 
  `pravs`.`d`.`is_panalty` AS `is_panalty`, 
  `pravs`.`d`.`brandlogo` AS `brandlogo`, 
  `pravs`.`d`.`panalty_day` AS `panalty_day`, 
  `pravs`.`d`.`panalty` AS `panalty`, 
  `pravs`.`d`.`regdt` AS `regdt`, 
  `pravs`.`d`.`uptdt` AS `uptdt`, 
  `pravs`.`b`.`img_i` AS `img_s` 
from 
  `pravs`.`gd_goods_display` `a` 
  join `pravs`.`gd_goods` `b` 
  left join `pravs`.`gd_goods_option` `c` on(
    (
      (
        `pravs`.`c`.`go_is_display` = '1'
      ) 
      and (
        `pravs`.`c`.`goodsno` = `pravs`.`a`.`goodsno`
      ) 
      and `pravs`.`c`.`link` 
      and (
        `pravs`.`c`.`go_is_deleted` <> '1'
      )
    )
  ) 
  left join `pravs`.`gd_goods_brand` `d` on(
    (
      `pravs`.`d`.`sno` = `pravs`.`b`.`brandno`
    )
  ) 
where 
  (
    (
      `pravs`.`b`.`goodsno` = `pravs`.`a`.`goodsno`
    ) 
    and (
      `pravs`.`a`.`tplSkin` = 'milanii'
    ) 
    and (`pravs`.`a`.`mode` = '2') 
    and `pravs`.`b`.`open`
  ) 
group by 
  `pravs`.`b`.`goodsno` 
order by 
  `pravs`.`a`.`sort` 
limit 
  100