From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ireneusz Pluta <ipluta@wp.pl>
Cc: jamcito <jamcito@poczta.fm>
Cc: pgsql-performance@postgresql.org
Subject: Re: partition text/varchar check problem
Date: Sat, 16 Dec 2006 15:34:41 -0500
Message-ID: <7744.1166301281@sss.pgh.pa.us> (raw)
In-Reply-To: <4584540D.2080208@wp.pl>
References: <458402D4.7080500@poczta.fm>
<4584540D.2080208@wp.pl>
Ireneusz Pluta <ipluta@wp.pl> writes:
> Can you show what you get from:
> EXPLAIN SELECT * FROM data WHERE name LIKE 'a%'
Won't help. Exact equality of the WHERE condition is useful for
partial-index cases, because there the planner needs to prove that
the WHERE condition implies the index predicate before it can use
the index; and exact equality is certainly sufficient for that.
But for constraint exclusion, the problem is to prove that the
WHERE condition refutes the constraint, rather than implies it.
Knowing that "name LIKE 'a%'" disproves "name LIKE 'b%'" requires
more knowledge about LIKE than the planner has got.
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, ipluta@wp.pl, jamcito@poczta.fm
Subject: Re: partition text/varchar check problem
In-Reply-To: <7744.1166301281@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