~* OR LIKE? - Mailing list pgsql-general

From Matt Friedman
Subject ~* OR LIKE?
Date
Msg-id 00bc01c0b3e7$3bcf6a00$03284d18@mattq3h8budilr
Whole thread Raw
Responses Re: ~* OR LIKE?
List pgsql-general
I have a query that I could run a number of ways:
Like this:

  index_word.word ~*'radio.*'
  OR
  index_word.word ~*'spry.*'

Or I could use LIKE and the "%" comparison

If I toss out the need for comparisions I could just use: IN
('radio','spry')

What's the relative performance for:  "IN" "LIKE" or "~*"? I'm trying to
decide if the performance loss of doing extra string compares is worth
getting slighly more relevant results.

Matt Friedman





pgsql-general by date:

Previous
From: will trillich
Date:
Subject: Re: Re: Re: Rules, views, sequences and returned values
Next
From: Doug McNaught
Date:
Subject: Re: Re: Re: Rules, views, sequences and returned values