From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tarabas (Manuel Rorarius) <tarabas@tarabas.de>
Cc: pgsql-performance@postgresql.org
Subject: Re: Problem with LIKE-Performance
Date: Tue, 18 Apr 2006 11:45:39 -0400
Message-ID: <13754.1145375139@sss.pgh.pa.us> (raw)
In-Reply-To: <653249740.20060418173459@tarabas.de>
References: <341367953.20060418163513@tarabas.de>
<13458.1145373620@sss.pgh.pa.us>
<653249740.20060418173459@tarabas.de>
"Tarabas (Manuel Rorarius)" <tarabas@tarabas.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, tarabas@tarabas.de
Subject: Re: Problem with LIKE-Performance
In-Reply-To: <13754.1145375139@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox