pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>
To: Albert Cervera Areny <albert@sedifa.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Posible planner improvement?
Date: Mon, 04 Aug 2008 13:16:45 -0500
Message-ID: <4897013D.EE98.0025.0@wicourts.gov> (raw)
In-Reply-To: <20080526201825.C96D.52131E4D@oss.ntt.co.jp>
References: <200805211228.48248.albert@sedifa.com>
	<20080526201825.C96D.52131E4D@oss.ntt.co.jp>

>>> On Mon, May 26, 2008 at  6:30 AM, ITAGAKI Takahiro
<itagaki.takahiro@oss.ntt.co.jp> wrote: 
> Albert Cervera Areny <albert@sedifa.com> wrote:
> 
>> I've got a query similar to this:
>> 
>> select * from t1, t2 where t1.id > 158507 and t1.id = t2.id;
>> 
>> That took > 84 minutes (the query was a bit longer but this is the
part that 
>> made the difference) after a little change the query took ~1
second:
>> 
>> select * from t1, t2 where t1.id > 158507 and t2.id > 158507 and
t1.id = 
>> t2.id;
> 
> I had a similar problem here:
>   http://archives.postgresql.org/pgsql-general/2007-02/msg00850.php
> and added a redundant inequality explicitly to make it work well.
> 
> I think it is worth trying to improve, but I'm not sure we can do it
> against user defined types. Does postgres always require transitive
law
> to all types?
 
I've recently run into this.  It would be a nice optimization,
if feasible.
 
-Kevin



view thread (14+ messages)

Message-ID: <4897013D.EE98.0025.0@wicourts.gov>
Permalink:  ../4897013D.EE98.0025.0@wicourts.gov/
Also on:    postgresql.org/message-id/4897013D.EE98.0025.0@wicourts.gov

 · 

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: Kevin.Grittner@wicourts.gov, itagaki.takahiro@oss.ntt.co.jp, albert@sedifa.com
  Subject: Re: Posible planner improvement?
  In-Reply-To: <4897013D.EE98.0025.0@wicourts.gov>

* 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