pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: 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, 26 May 2008 20:30:00 +0900
Message-ID: <20080526201825.C96D.52131E4D@oss.ntt.co.jp> (raw)
In-Reply-To: <200805211228.48248.albert@sedifa.com>
References: <200805211228.48248.albert@sedifa.com>

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





view thread (14+ messages)  latest in thread

Message-ID: <20080526201825.C96D.52131E4D@oss.ntt.co.jp>
Permalink:  ../20080526201825.C96D.52131E4D@oss.ntt.co.jp/
Also on:    postgresql.org/message-id/20080526201825.C96D.52131E4D@oss.ntt.co.jp

 · 

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: itagaki.takahiro@oss.ntt.co.jp, albert@sedifa.com
  Subject: Re: Posible planner improvement?
  In-Reply-To: <20080526201825.C96D.52131E4D@oss.ntt.co.jp>

* 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