From: | Antonin Houska <antonin(dot)houska(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Todo item: Support amgettuple() in GIN |
Date: | 2013-11-29 13:56:54 |
Message-ID: | 52989D26.1060309@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 11/29/2013 01:57 PM, Andreas Karlsson wrote:
> On 11/29/2013 09:54 AM, Antonin Houska wrote:
>> On 11/29/2013 01:13 AM, Andreas Karlsson wrote:
>>
>>> When doing partial matching the code need to be able to return the union
>>> of all TIDs in all the matching posting trees in TID order (to be able
>>> to do AND and OR operations with multiple search keys later). It does
>>> this by traversing them posting tree after posting tree and collecting
>>> them all in a TIDBitmap which is later iterated over.
>>
>> I think it's not a plain union. My understanding is that - to evaluate a
>> single key (typically array) - you first need to get all the TID streams
>> for that key (i.e. one posting list/tree per element of the key array)
>> and then iterate all these streams in parallel and 'merge' them using
>> consistent() function. That's how I understand ginget.c:keyGetItem().
>
> For partial matches the merging is done in two steps: first a simple
> union of all the streams per key and then second merging those union
> streams using the consistent() function.
Yes, short after I sent my previous mail I realized that your "union"
probably referred to the things that collectMatchBitmap() does.
// Tony
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2013-11-29 14:18:49 | Re: SSL: better default ciphersuite |
Previous Message | Rajeev rastogi | 2013-11-29 13:50:27 | Re: COPY table FROM STDIN doesn't show count tag |