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

Re: partition text/varchar check problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ireneusz Pluta <ipluta(at)wp(dot)pl>
Cc: jamcito <jamcito(at)poczta(dot)fm>, pgsql-performance(at)postgresql(dot)org
Subject: Re: partition text/varchar check problem
Date: 2006-12-16 20:34:41
Message-ID: 7744.1166301281@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
Ireneusz Pluta <ipluta(at)wp(dot)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

In response to

pgsql-performance by date

Next:From: Dimitri FontaineDate: 2006-12-16 21:32:59
Subject: Re: Scaling concerns
Previous:From: jamcitoDate: 2006-12-16 20:30:03
Subject: Re: partition text/varchar check problem

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