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