pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #5887: EXPLAIN returns more than 1000 rows when table is empty
3+ messages / 3 participants
[nested] [flat]
* BUG #5887: EXPLAIN returns more than 1000 rows when table is empty
@ 2011-02-15 17:22 Nick Baryshnikov <Warstone@list.ru>
0 siblings, 1 reply; 3+ messages in thread
From: Nick Baryshnikov @ 2011-02-15 17:22 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged online:
Bug reference: 5887
Logged by: Nick Baryshnikov
Email address: Warstone@list.ru
PostgreSQL version: 8.4.7
Operating system: Ubuntu 10.10
Description: EXPLAIN returns more than 1000 rows when table is empty
Details:
CREATE TABLE test (
id bigserial NOT NULL PRIMARY KEY
);
VACUUM FULL ANALYZE test;
EXPLAIN ANALYZE SELECT * FROM test;
INSERT INTO test VALUES (DEFAULT);
VACUUM FULL ANALYZE test;
EXPLAIN ANALYZE SELECT * FROM test;
1-st EXPLAIN give me:
"Seq Scan on test (cost=0.00..31.40 rows=2140 width=8) (actual
time=0.003..0.003 rows=0 loops=1)"
"Total runtime: 0.040 ms"
2-nd:
"Seq Scan on test (cost=0.00..1.01 rows=1 width=8) (actual
time=0.004..0.005 rows=1 loops=1)"
"Total runtime: 0.025 ms"
VACUUM FULL ANALYZE didn't works when there is 0 records in the table?
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #5887: EXPLAIN returns more than 1000 rows when table is empty
@ 2011-02-15 19:52 Tom Lane <tgl@sss.pgh.pa.us>
parent: Nick Baryshnikov <Warstone@list.ru>
0 siblings, 1 reply; 3+ messages in thread
From: Tom Lane @ 2011-02-15 19:52 UTC (permalink / raw)
To: Nick Baryshnikov <Warstone@list.ru>; +Cc: pgsql-bugs
"Nick Baryshnikov" <Warstone@list.ru> writes:
> Description: EXPLAIN returns more than 1000 rows when table is empty
This is not a bug; it's intentional behavior. As long as the recorded
size of the table is zero, the planner assumes that information is
probably obsolete.
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #5887: EXPLAIN returns more than 1000 rows when table is empty
@ 2011-03-03 16:01 Robert Haas <robertmhaas@gmail.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 3+ messages in thread
From: Robert Haas @ 2011-03-03 16:01 UTC (permalink / raw)
To: Warstone@list.ru <warstone@list.ru>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-bugs
On Tue, Feb 15, 2011 at 3:59 PM, Warstone@list.ru <warstone@list.ru> wrote:
> Understood. Can you show me where it is written in the documentation?
> (I just want to know is, whether it is in the documentation and if not, probably should add this case)
This is a pretty frequently asked question, so it might be worth
documenting. But I'm not sure exactly where in the documentation it
should go.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2011-03-03 16:01 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-02-15 17:22 BUG #5887: EXPLAIN returns more than 1000 rows when table is empty Nick Baryshnikov <Warstone@list.ru>
2011-02-15 19:52 ` Tom Lane <tgl@sss.pgh.pa.us>
2011-03-03 16:01 ` Robert Haas <robertmhaas@gmail.com>
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