Re: [HACKERS] GIN vs. Partial Indexes

2010-11-12 Thread Tom Lane
Bruce Momjian writes: > OK, can you add it or give me wording, or it is already on the TODO > list? It's already there. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.or

Re: [HACKERS] GIN vs. Partial Indexes

2010-11-12 Thread Bruce Momjian
Andrew Dunstan wrote: > > > On 11/12/2010 01:11 PM, Bruce Momjian wrote: > > Josh Berkus wrote: > >> On 10/08/2010 02:44 PM, Robert Haas wrote: > In any case, I would expect that GIN could actually do this quite > efficiently. What we'd probably want is a concept of a "null word",

Re: [HACKERS] GIN vs. Partial Indexes

2010-11-12 Thread Andrew Dunstan
On 11/12/2010 01:11 PM, Bruce Momjian wrote: Josh Berkus wrote: On 10/08/2010 02:44 PM, Robert Haas wrote: In any case, I would expect that GIN could actually do this quite efficiently. What we'd probably want is a concept of a "null word", with empty indexable rows entered in the inde

Re: [HACKERS] GIN vs. Partial Indexes

2010-11-12 Thread Bruce Momjian
Josh Berkus wrote: > On 10/08/2010 02:44 PM, Robert Haas wrote: > >> In any case, I would expect that GIN could actually do this quite > >> efficiently. What we'd probably want is a concept of a "null word", > >> with empty indexable rows entered in the index as if they contained the > >> null

Re: [HACKERS] GIN vs. Partial Indexes

2010-10-23 Thread Josh Berkus
On 10/08/2010 02:44 PM, Robert Haas wrote: In any case, I would expect that GIN could actually do this quite efficiently. What we'd probably want is a concept of a "null word", with empty indexable rows entered in the index as if they contained the null word. So there'd be just one index en

Re: [HACKERS] GIN vs. Partial Indexes

2010-10-08 Thread David E. Wheeler
On Oct 8, 2010, at 1:47 PM, Tom Lane wrote: > How so? In a typical application, there would not likely be very many > such rows --- we're talking about cases like documents containing zero > indexable words. In any case, the problem right now is that GIN has > significant functional limitations

Re: [HACKERS] GIN vs. Partial Indexes

2010-10-08 Thread Robert Haas
On Fri, Oct 8, 2010 at 1:47 PM, Tom Lane wrote: > Robert Haas writes: >> On Thu, Oct 7, 2010 at 10:52 PM, Tom Lane wrote: >>> IMO, what's needed is to fix GIN so it doesn't go insane for empty >>> values or non-restrictive queries, by ensuring there's at least one >>> index entry for every row.

Re: [HACKERS] GIN vs. Partial Indexes

2010-10-08 Thread Tom Lane
Robert Haas writes: > On Thu, Oct 7, 2010 at 10:52 PM, Tom Lane wrote: >> IMO, what's needed is to fix GIN so it doesn't go insane for empty >> values or non-restrictive queries, by ensuring there's at least one >> index entry for every row.  This has been discussed before; see the TODO >> sectio

Re: [HACKERS] GIN vs. Partial Indexes

2010-10-08 Thread Robert Haas
On Thu, Oct 7, 2010 at 10:52 PM, Tom Lane wrote: > Josh Berkus writes: >> I thought we fixed this in 8.4.4, but apparently not.  In the event that >> you have a GIN index containing a WHERE clause which is sufficiently >> restrictive, PostgreSQL will attempt to use the index even though it >> can

Re: [HACKERS] GIN vs. Partial Indexes

2010-10-08 Thread Josh Berkus
IMO, what's needed is to fix GIN so it doesn't go insane for empty values or non-restrictive queries, by ensuring there's at least one index entry for every row. This has been discussed before; see the TODO section for GIN. Well, what is that fix waiting on, then? Oleg, Teodor? We may even

Re: [HACKERS] GIN vs. Partial Indexes

2010-10-07 Thread Tom Lane
Josh Berkus writes: > I thought we fixed this in 8.4.4, but apparently not. In the event that > you have a GIN index containing a WHERE clause which is sufficiently > restrictive, PostgreSQL will attempt to use the index even though it > can't. We could probably kluge the planner to avoid that c

[HACKERS] GIN vs. Partial Indexes

2010-10-07 Thread Josh Berkus
All, I thought we fixed this in 8.4.4, but apparently not. In the event that you have a GIN index containing a WHERE clause which is sufficiently restrictive, PostgreSQL will attempt to use the index even though it can't. Since this is completely out of the control of the user, it effectively pr