Re: Minmax indexes - Mailing list pgsql-hackers

From Chris Travers
Subject Re: Minmax indexes
Date
Msg-id 92693471.233111.1379326759346.open-xchange@email.1and1.co.uk
Whole thread Raw
In response to Re: Minmax indexes  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Responses Re: Minmax indexes
List pgsql-hackers
 

> On 16 September 2013 at 11:03 Heikki Linnakangas <hlinnakangas@vmware.com> wrote:

>
> Something like this seems completely sensible to me:
>
> create index i_accounts on accounts using minmax (ts) where valid = true;
>
> The situation where that would be useful is if 'valid' accounts are
> fairly well clustered, but invalid ones are scattered all over the
> table. The minimum and maximum stoed in the index would only concern
> valid accounts.
 
Here's one that occurs to me:
 
CREATE INDEX i_billing_id_mm ON billing(id) WHERE paid_in_full IS NOT TRUE;
 
Note that this would be a frequently moving target and over years of billing, the subset would be quite small compared to the full system (imagine, say, 50k rows out of 20M).
 
Best Wises,
Chris Travers
>
> - Heikki
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
Best Wishes,
Chris Travers
http://www.2ndquadrant.com
PostgreSQL Services, Training, and Support

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: patch: add MAP_HUGETLB to mmap() where supported (WIP)
Next
From: Andres Freund
Date:
Subject: Re: git apply vs patch -p1