pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Brown <time@bigpond.net.au>
Cc: Josh Berkus <pgsql-performance@postgresql.org>
Subject: Re: multi-column index
Date: Wed, 16 Mar 2005 22:19:13 -0500
Message-ID: <19588.1111029553@sss.pgh.pa.us> (raw)
In-Reply-To: <4238CE87.1040904@bigpond.net.au>
References: <42385A1B.9090305@ibcp.fr>
	<200503161009.24713.josh@agliodbs.com>
	<4238CE87.1040904@bigpond.net.au>

David Brown <time@bigpond.net.au> writes:
> Actually, I'm surprised the planner came up with such a low cost for the 
> single column index, unless ... perhaps correlation statistics aren't 
> used when determining costs for multi-column indexes?

The correlation calculation for multi-column indexes is pretty whacked
out pre-8.0.  I don't think it's that great in 8.0 either --- we really
need to make ANALYZE calculate the correlation explicitly for each
index, probably, rather than trying to use per-column correlations.

			regards, tom lane



view thread (10+ messages)  latest in thread

Message-ID: <19588.1111029553@sss.pgh.pa.us>
Permalink:  ../19588.1111029553@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/19588.1111029553@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, time@bigpond.net.au
  Subject: Re: multi-column index
  In-Reply-To: <19588.1111029553@sss.pgh.pa.us>

* 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