Re: Posible planner improvement?

From: Albert Cervera Areny <albert(at)sedifa(dot)com>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Posible planner improvement?
Date: 2008-05-21 11:11:24
Message-ID: 200805211311.25016.albert@sedifa.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

A Dimecres 21 Maig 2008, Richard Huxton va escriure:
> Albert Cervera Areny 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;
>
> Try posting EXPLAIN ANALYSE SELECT ... for both of those queries and
> we'll see why it's better at the second one.

Right, attached an example of such a difference.


Attachment Content-Type Size
queries.txt text/plain 2.4 KB

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Mark Mielke 2008-05-21 11:24:55 Re: Posible planner improvement?
Previous Message Richard Huxton 2008-05-21 10:48:05 Re: Posible planner improvement?