Re: A slow query - Help please?

From: Alban Hertroys <alban(at)magproductions(dot)nl>
To: Jim Nasby <jnasby(at)pervasive(dot)com>
Cc: hubert depesz lubaczewski <depesz(at)gmail(dot)com>, Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: A slow query - Help please?
Date: 2006-06-21 09:56:27
Message-ID: 449917CB.9030106@magproductions.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jim Nasby wrote:
> On Jun 19, 2006, at 7:00 AM, Alban Hertroys wrote:
>
>> Now all we need to do is getting MMBase to do its queries like this :P
>
>
> Probably a better bet would be going to 8.1 and using constraint
> elimination.

I searched the documentation, google and wikipedia for "constraint
elimination", but couldn't find anything more specific than a reference
to an O'Reilly conference about the subject.

Maybe you mean constraint exclusion?

If so, is that going to help excluding partitions (basically the same
thing, it seems) from a query based on an ORDER BY and a LIMIT?

Say we take the query I posted:
"SELECT * FROM mm_posrel ORDER BY number DESC LIMIT 25;"
and the knowledge that this table is inherited by two other tables, with
number being unique across them (though PostgreSQL probably doesn't know
about this).
Can constraint exclusion determine that the last 25 number values do not
occur in some of the tables?

This looks liek an interesting solution, could save us quite a bit of
work if we manage to use this...

--
Alban Hertroys
alban(at)magproductions(dot)nl

magproductions b.v.

T: ++31(0)534346874
F: ++31(0)534346876
M:
I: www.magproductions.nl
A: Postbus 416
7500 AK Enschede

// Integrate Your World //

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Oleg Golovanov 2006-06-21 10:01:44 Re: [GENERAL] DocBook 4.2 detecting at configure time
Previous Message Peter Eisentraut 2006-06-21 09:39:59 Re: DocBook 4.2 detecting at configure time