From: Richard Huxton <dev@archonet.com>
To: Gaetano Mendola <gmendola@mbigroup.it>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Wrong plan sequential scan instead of an index one
Date: Fri, 30 Mar 2007 12:48:18 +0100
Message-ID: <460CF902.4020707@archonet.com> (raw)
In-Reply-To: <460CF40F.6060303@mbigroup.it>
References: <460CD941.6080303@bigfoot.com>
<460CDCDC.7020901@archonet.com>
<460CE359.8060208@bigfoot.com>
<460CE775.8080908@archonet.com>
<460CF40F.6060303@mbigroup.it>
Gaetano Mendola wrote:
>
> The match 19 for '%pi%' is estimated, the real matches are:
>
> test=# select id from l_pvcp where value ilike '%pi%';
> id
> - ----
> 62
> (1 row)
>
>
> test=# select id from l_pvcp where value ilike 'pi';
> id
> - ----
> 62
> (1 row)
>
> so one row in both cases, that's why I expect for both same plan.
Ah, but it's got no way of knowing what matches you'll get for
'%anything%'. There's no easy way to get statistics for matching substrings.
--
Richard Huxton
Archonet Ltd
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: dev@archonet.com, gmendola@mbigroup.it
Subject: Re: Wrong plan sequential scan instead of an index one
In-Reply-To: <460CF902.4020707@archonet.com>
* 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