pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Davis <pgsql@j-davis.com>
To: Dimitri Fontaine <dim@dalibo.com>
Cc: pgsql-performance@postgresql.org, Ioana Danes <ioanasoftware@yahoo.ca>
Subject: Re: Postgresql 8.1.4 - performance issues for select on
Date: Wed, 18 Oct 2006 14:33:49 -0700
Message-ID: <1161207230.31645.266.camel@dogma.v10.wvs> (raw)
In-Reply-To: <200610182319.41920.dim@dalibo.com>
References: <20061018210201.56435.qmail@web55907.mail.re3.yahoo.com>
	<200610182319.41920.dim@dalibo.com>

On Wed, 2006-10-18 at 23:19 +0200, Dimitri Fontaine wrote:
> Le mercredi 18 octobre 2006 23:02, Ioana Danes a écrit :
> > I tried the partitioning scenario but I've got into
> > the same problem. The max function is not using the
> > indexes on the two partitioned tables...
> >
> > Any other thoughts?
> 
> Did you make sure your test included table inheritance?
> I'm not sure the planner benefits from constraint_exclusion without selecting 
> the empty parent table (instead of your own union based view).
> 

constraint exclusion and inheritance won't help him.

The problem is that he has two indexes, and he needs to find the max
between both of them. PostgreSQL isn't smart enough to recognize that it
can use two indexes, find the max in each one, and find the max of those
two values.

Regards,
	Jeff Davis




view thread (16+ messages)  latest in thread

Message-ID: <1161207230.31645.266.camel@dogma.v10.wvs>
Permalink:  ../1161207230.31645.266.camel@dogma.v10.wvs/
Also on:    postgresql.org/message-id/1161207230.31645.266.camel@dogma.v10.wvs

 · 

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: pgsql@j-davis.com, dim@dalibo.com, ioanasoftware@yahoo.ca
  Subject: Re: Postgresql 8.1.4 - performance issues for select on
  In-Reply-To: <1161207230.31645.266.camel@dogma.v10.wvs>

* 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