Re: poor performing plan from analyze vs. fast default plan pre-analyze on new database

From: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
To: Davin Potts <davin(at)appliomics(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: poor performing plan from analyze vs. fast default plan pre-analyze on new database
Date: 2009-06-03 16:07:37
Message-ID: 2f4958ff0906030907g1d6e969dq61956d7e192d5dfe@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Postgresql isn't very efficient with subselects like that,
try:
explain select c.id from content c LEFT JOIN (select min(id) AS id
from content group by hash) cg ON cg.id=c.id WHERE cg.id is null;

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2009-06-03 16:27:57 Re: poor performing plan from analyze vs. fast default plan pre-analyze on new database
Previous Message Davin Potts 2009-06-03 15:42:40 poor performing plan from analyze vs. fast default plan pre-analyze on new database