Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 1FBE7133655C for ; Tue, 15 Feb 2011 13:22:34 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 17078-05 for ; Tue, 15 Feb 2011 17:22:33 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by mail.postgresql.org (Postfix) with ESMTP id 2AE46133616B for ; Tue, 15 Feb 2011 13:22:32 -0400 (AST) Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by wwwmaster.postgresql.org (8.14.3/8.14.3) with ESMTP id p1FHMVEw035498 for ; Tue, 15 Feb 2011 17:22:31 GMT (envelope-from www@wwwmaster.postgresql.org) Received: (from www@localhost) by wwwmaster.postgresql.org (8.14.3/8.14.3/Submit) id p1FHMVuc035497; Tue, 15 Feb 2011 17:22:31 GMT (envelope-from www) Date: Tue, 15 Feb 2011 17:22:31 GMT Message-Id: <201102151722.p1FHMVuc035497@wwwmaster.postgresql.org> To: pgsql-bugs@postgresql.org Subject: BUG #5887: EXPLAIN returns more than 1000 rows when table is empty From: "Nick Baryshnikov" Content-Type: text/plain; charset=utf-8 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 201102/136 X-Sequence-Number: 29408 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?