Re: How to get around LIKE inefficiencies?

Marc G. Fournier <scrappy@hub.org>

From: The Hermit Hacker <scrappy@hub.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Date: 2000-11-06T03:01:37Z
Lists: pgsql-hackers
yowch ... removing that one index makes my 'test' search (mvcc) come back
as:

[97366] SQL 0.05s: SELECT ndict.url_id,ndict.intag FROM ndict,url WHERE ndict.word_id=572517542 AND url.rec_id=ndict.url_id  AND (url.url LIKE 'http://www.postgresql.org/%')

vs what we were doing before ... now, let's see how increasing the number
of docs indexed changes this ...

thanks ... 


On Sun, 5 Nov 2000, Tom Lane wrote:

> A brute-force answer would be to remove the url_url index ;-)
> dunno if that would slow down other queries, however.
> 
> 			regards, tom lane
> 
> 

Marc G. Fournier                   ICQ#7615664               IRC Nick: Scrappy
Systems Administrator @ hub.org 
primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org