From: Shaun Thomas <sthomas@optionshouse.com>
To: Craig Ringer <ringerc@ringerc.id.au>
Cc: Eyal Wilde <eyal@impactsoft.co.il>
Cc: pgsql-performance@postgresql.org
Subject: Re: index-only scan is missing the INCLUDE feature
Date: Wed, 20 Jun 2012 10:32:19 -0500
Message-ID: <4FE1ED03.3090709@optionshouse.com> (raw)
In-Reply-To: <4FE1D9F9.1020805@ringerc.id.au>
References: <CAMiEbcjxN7cRYGtRMZuxEoztEOMB4us+pSdanwSkRY=ocJiQ8Q@mail.gmail.com>
<4FE1D9F9.1020805@ringerc.id.au>
On 06/20/2012 09:11 AM, Craig Ringer wrote:
> For those of us who don't know MS-SQL, can you give a quick
> explanation of what the INCLUDE keyword in an index definition is
> expected to do, or some documentation references?
He's talking about what MS SQL Server commonly calls a "covering index."
In these cases, you can specify columns to be included in the index, but
not actually part of the calculated hash. This prevents a trip to the
table data, so selects can be serviced entirely by an index scan.
PostgreSQL is about half way there by allowing index-only scans, though
I've no idea if they intend on adding further functionality like this.
Effectively you can trade index bloat for query speed. But considering
the differences between the engines, it might not be necessary. I
couldn't say.
--
Shaun Thomas
OptionsHouse | 141 W. Jackson Blvd. | Suite 500 | Chicago IL, 60604
312-444-8534
sthomas@optionshouse.com
______________________________________________
See http://www.peak6.com/email_disclaimer/ for terms and conditions related to this email
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: sthomas@optionshouse.com, ringerc@ringerc.id.au, eyal@impactsoft.co.il
Subject: Re: index-only scan is missing the INCLUDE feature
In-Reply-To: <4FE1ED03.3090709@optionshouse.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox