pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki@enterprisedb.com>
To: Bucky Jordan <bjordan@lumeta.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Brian Herlihy <btherl@yahoo.com.au>
Cc: Postgresql Performance <pgsql-performance@postgresql.org>
Subject: Re: Simple join optimized badly?
Date: Wed, 11 Oct 2006 15:51:11 +0100
Message-ID: <452D04DF.4040904@enterprisedb.com> (raw)
In-Reply-To: <78ED28FACE63744386D68D8A9D1CF5D4209C7A@MAIL.corp.lumeta.com>
References: <78ED28FACE63744386D68D8A9D1CF5D4209C7A@MAIL.corp.lumeta.com>

Bucky Jordan wrote:
> 
> Is this along the lines of "I'm loading a big table and touching every
> row of data, so I may as well collect some stats along the way" and "I
> know my data contains these statistical properties, but the analyzer
> wasn't able to figure that out (or maybe can't figure it out efficiently
> enough)"?
> 
> While it seems like this would require more knowledge from the user
> (e.g. more about their data, how the planner works, and how it uses
> statistics) this would actually be helpful/required for those who really
> care about performance. ...

The user would have to know his data, but he wouldn't need to know how 
the planner works. While with hints like "use index X", he *does* need 
to know how the planner works.

Being able to give hints about statistical properties of relations and 
their relationships seems like a good idea to me. And we can later 
figure out ways to calculate them automatically.

BTW, in DB2 you can declare a table as volatile, which means that the 
cardinality of the table varies greatly. The planner favors index scans 
on volatile tables.

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com



view thread (56+ messages)  latest in thread

Message-ID: <452D04DF.4040904@enterprisedb.com>
Permalink:  ../452D04DF.4040904@enterprisedb.com/
Also on:    postgresql.org/message-id/452D04DF.4040904@enterprisedb.com

 · 

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: heikki@enterprisedb.com, bjordan@lumeta.com, tgl@sss.pgh.pa.us, btherl@yahoo.com.au
  Subject: Re: Simple join optimized badly?
  In-Reply-To: <452D04DF.4040904@enterprisedb.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