Strange scenary.

From: Guido Barosio <gbarosio(at)sinectis(dot)com(dot)ar>
To: pgsql-admin(at)postgresql(dot)org
Subject: Strange scenary.
Date: 2004-07-03 21:18:56
Message-ID: 20040703181856.3c861bb4.gbarosio@sinectis.com.ar
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,

This is the problem. I create a database from cero. I create a empty table, name students. I ask for an EXPLAIN
on this new table, and the output of the query analyzer tells me that this table is filled with 1000 rows.

So...why is that?

This were the steps.

-bash-2.05b$ dropdb scopes
DROP DATABASE
-bash-2.05b$ createdb scopes
CREATE DATABASE
-bash-2.05b$ psql scopes
Welcome to psql, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit

scopes=# create table students (id smallint, name text);
CREATE
scopes=# explain select * from students ;
NOTICE: QUERY PLAN:

Seq Scan on students (cost=0.00..20.00 rows=1000 width=34)

EXPLAIN
scopes=# select * from students ;
id | name
----+------
(0 rows)

scopes=# VACUUM students ;
VACUUM
scopes=# explain select * from students ;
NOTICE: QUERY PLAN:

Seq Scan on students (cost=0.00..0.00 rows=1 width=34)

EXPLAIN
scopes=#

Anyone can tell me why this is going on? I mean..as I see this is not true.

--
-------------------------------------------
Guido Barosio
Buenos Aires, Argentina
-------------------------------------------

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Adam Smith 2004-07-04 08:54:26 Re: Is this a "Stupid Question" ?
Previous Message Gaetano Mendola 2004-07-03 14:51:50 Re: BUG #1186: Broken Index?