Hive LIKE is specially optimized for prefix, suffix and instr
operations, so it's not likely to see a difference.

Zheng

On Tue, Aug 10, 2010 at 12:40 AM, Neil Xu <[email protected]> wrote:
> Hi, all,
>
>     I am wondering whether INSTR will run faster than LIKE, in all cases, or
> in some cases?
>
>     for example, INSTR(url, 'http://www.google.com/') = 1     VS url like
> 'http://www.google.com/%'
>                        INSTR(url, 'google') = 0     VS not url like
> '%google%'
>                        INSTR(url, 'google') > 0     VS url like '%google%'
>
>
>    who can give some details, Thanks!
>
>
>
> Chocobo
>
> 2010-08-10
>



-- 
Yours,
Zheng
http://www.linkedin.com/in/zshao

Reply via email to