Re: Row estimates on empty table

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alban Hertroys <dalroi(at)solfertje(dot)student(dot)utwente(dot)nl>
Cc: "pgsql-general(at)postgresql(dot)org List" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Row estimates on empty table
Date: 2009-09-17 21:39:45
Message-ID: 4488.1253223585@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alban Hertroys <dalroi(at)solfertje(dot)student(dot)utwente(dot)nl> writes:
> I'm seeing something strange with the row-estimates on an empty table.

It's intentional that we don't assume an empty table is empty.
Otherwise you could get some spectacularly awful plans if you
create a table, fill it, and immediately query it.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2009-09-17 21:47:49 Re: haversine formula with postgreSQL
Previous Message Tom Lane 2009-09-17 21:25:07 Re: 'Weird' errors