From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Royce Ausburn <royce(dot)ml(at)inomial(dot)com> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Index only scan paving the way for "auto" clustered tables? |
Date: | 2011-10-11 18:54:17 |
Message-ID: | CA+TgmobuJpLirKvQwhOOp6bmSbRSga+Ctj=Z7wb9zAfFaz7rFg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Oct 11, 2011 at 7:08 AM, Royce Ausburn <royce(dot)ml(at)inomial(dot)com> wrote:
> I wonder, could the recent work on index only scans pave the way for auto clustered tables? Consider a wide, mostly insert table with some subset of columns that I'd like to cluster on. I'm after locality of tuples that are very frequently fetched together, but not keen on the downtime for a cluster, nor the maintenance that it requires. Would it be a stretch to have an index that branches on the subset of "cluster" columns, but still stores all the columns, making it a covering index? Given that we can already index concurrently, such an index would not require downtime, and would be self maintaining. From my understanding of the index-only scan implementation, I suspect that such an index would effectively give locality, with some caveats…
I guess we could do that, but I'm not convinced there would be much
benefit. The only thing you'd be saving would be the cost of keeping
the tuples sorted by only the high-order columns rather than all of
them, and I doubt that's significant.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Joe Conway | 2011-10-11 18:57:29 | Re: SET variable - Permission issues |
Previous Message | Kevin Grittner | 2011-10-11 18:53:00 | Re: SET variable - Permission issues |