Re: LIKE optimization

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Nabil Sayegh <nsmail(at)sayegh(dot)de>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: LIKE optimization
Date: 2001-01-16 16:33:47
Message-ID: 12758.979662827@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Nabil Sayegh <nsmail(at)sayegh(dot)de> writes:
> Although the two queries should be equivalent the second takes about 4s
> and the first takes almost 2 MINUTES.

It's impossible to say anything intelligent about this with only the
text of the queries to go on. What indexes do you have on these tables?
What does EXPLAIN show as the query plan for each query?

Oh, and have you done a VACUUM ANALYZE recently on these tables?

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Nabil Sayegh 2001-01-16 16:58:51 Re: LIKE optimization
Previous Message Tom Lane 2001-01-16 16:19:22 Re: log file?