Re: index-only scan is missing the INCLUDE feature

From: Shaun Thomas <sthomas(at)optionshouse(dot)com>
To: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
Cc: Eyal Wilde <eyal(at)impactsoft(dot)co(dot)il>, <pgsql-performance(at)postgresql(dot)org>
Subject: Re: index-only scan is missing the INCLUDE feature
Date: 2012-06-20 15:32:19
Message-ID: 4FE1ED03.3090709@optionshouse.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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(at)optionshouse(dot)com

______________________________________________

See http://www.peak6.com/email_disclaimer/ for terms and conditions related to this email

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message philippe.beaudoin 2012-06-20 19:51:38 random char or text variable in pgbench
Previous Message Steve Crawford 2012-06-20 15:27:14 Re: pgbouncer - massive overhead?