select id ,ietm_name from pkt_item where match(item_name) against('+good +boy ' in boolean mode)

select id ,ietm_name from (select id ,ietm_name from pkt_item where match(item_name) against('good +boy ')) as temp where item_name like 'good' and like 'boy'
哪个效率更高?????????????????????????????????

解决方案 »

  1.   

    第二句应该是    select id ,ietm_name from (select id ,ietm_name from pkt_item where match(item_name) against('good boy ')) as temp where item_name like 'good' and like 'boy' 
      

  2.   

    第二句还是没写对,应该是
    第二句应该是    select id ,ietm_name from (select id ,ietm_name from pkt_item where match(item_name) against('good boy ')) as temp where item_name like '%good%' and like '%boy%' 
      

  3.   

    第一句好,用Like效率很低,用正则比较好