Skip site navigation (1) Skip section navigation (2)

Re: Problem with LIKE-Performance

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Tarabas (Manuel Rorarius)" <tarabas(at)tarabas(dot)de>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Problem with LIKE-Performance
Date: 2006-04-18 15:45:39
Message-ID: 13754.1145375139@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
"Tarabas (Manuel Rorarius)" <tarabas(at)tarabas(dot)de> writes:
> After removing the enable_seqscan = off and making sure it was gone,
> it is a lot faster again.
> Now it takes about 469.841 ms for the select.

Um, no, enable_seqscan would certainly not have had any effect on the
*actual* runtime of this query.  All that enable_seqscan = off really
does is to add a large constant to the estimated cost of any seqscan,
so as to prevent the planner from selecting it unless there is no other
alternative plan available.  But that has nothing to do with how long
the seqscan will really run.

If you are seeing a speedup in repeated executions of the same seqscan
plan, it's probably just a caching effect.

As already noted, it might be worth your while to add an index using the
pattern-ops opclass to help with queries like this.

			regards, tom lane

In response to

Responses

pgsql-performance by date

Next:From: Tarabas (Manuel Rorarius)Date: 2006-04-18 16:04:34
Subject: Re: [bulk] Re: Problem with LIKE-Performance
Previous:From: Tarabas (Manuel Rorarius)Date: 2006-04-18 15:43:53
Subject: Re: [bulk] RE: Problem with LIKE-Performance

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group