pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Dunstan <andrew@dunslane.net>
To: Claudio Freire <klaussfreire@gmail.com>
Cc: AI Rumman <rummandba@gmail.com>
Cc: postgres performance list <pgsql-performance@postgresql.org>
Subject: Re: Why does the number of rows are different in actual and estimated.
Date: Thu, 13 Dec 2012 18:09:42 -0500
Message-ID: <50CA6036.6000107@dunslane.net> (raw)
In-Reply-To: <CAGTBQpZrERogVMvzAXouhvq-ERYtSUnR6QUk2EMJren0aB-PNQ@mail.gmail.com>
References: <CAGoODpdaGPEOyAPkWvLD=0xfQ=k-a8B_fT=Tb6QJ0uNrDv=Hvg@mail.gmail.com>
	<50CA586A.30008@dunslane.net>
	<CAGTBQpZrERogVMvzAXouhvq-ERYtSUnR6QUk2EMJren0aB-PNQ@mail.gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>


On 12/13/2012 05:42 PM, Claudio Freire wrote:
> And it looks like it all may be starting to go south here:
>>                                         ->  Hash Join  (cost=9337.97..18115.71 rows=34489 width=244) (actual time=418.054..1156.453 rows=205420 loops=1)
>>                                               Hash Cond: (customerdetails.customerid = entity.id)


Well, it looks like it's choosing a join order that's quite a bit 
different from the way the query is expressed, so the OP might need to 
play around with forcing the join order some.


cheers

andrew


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



view thread (20+ messages)  latest in thread

Message-ID: <50CA6036.6000107@dunslane.net>
Permalink:  ../50CA6036.6000107@dunslane.net/
Also on:    postgresql.org/message-id/50CA6036.6000107@dunslane.net

 · 

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: andrew@dunslane.net, klaussfreire@gmail.com, rummandba@gmail.com
  Subject: Re: Why does the number of rows are different in actual and estimated.
  In-Reply-To: <50CA6036.6000107@dunslane.net>

* 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