From: Andrew Dunstan <andrew@dunslane.net>
To: AI Rumman <rummandba@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Why does the number of rows are different in actual and estimated.
Date: Thu, 13 Dec 2012 17:36:26 -0500
Message-ID: <50CA586A.30008@dunslane.net> (raw)
In-Reply-To: <CAGoODpdaGPEOyAPkWvLD=0xfQ=k-a8B_fT=Tb6QJ0uNrDv=Hvg@mail.gmail.com>
References: <CAGoODpdaGPEOyAPkWvLD=0xfQ=k-a8B_fT=Tb6QJ0uNrDv=Hvg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
On 12/13/2012 05:12 PM, AI Rumman wrote:
> Why does the number of rows are different in actual and estimated?
>
Isn't that in the nature of estimates? An estimate is a heuristic guess
at the number of rows it will find for the given query or part of a
query. It's not uncommon for estimates to be out by several orders of
magnitude. Guaranteeing estimates within bounded accuracy and in a given
short amount of time (you don't want your planning time to overwhelm
your execution time) isn't possible.
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
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, rummandba@gmail.com
Subject: Re: Why does the number of rows are different in actual and estimated.
In-Reply-To: <50CA586A.30008@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