Re: Posible planner improvement? - Mailing list pgsql-performance

From ITAGAKI Takahiro
Subject Re: Posible planner improvement?
Date
Msg-id 20080526201825.C96D.52131E4D@oss.ntt.co.jp
Whole thread Raw
In response to Posible planner improvement?  (Albert Cervera Areny <albert@sedifa.com>)
Responses Re: Posible planner improvement?
List pgsql-performance
Hello Albert,

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?

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center



pgsql-performance by date:

Previous
From: "Jeffrey Baker"
Date:
Subject: Re: Quad Xeon or Quad Opteron?
Next
From: "Heikki Linnakangas"
Date:
Subject: Re: I/O on select count(*)