Re: explain plan - Mailing list pgsql-novice

From Francisco Reyes
Subject Re: explain plan
Date
Msg-id Pine.BSF.4.32.0102020007560.1877-100000@zoraida.reyes.somos.net
Whole thread Raw
In response to explain plan  (rudy <rudy@heymax.com>)
List pgsql-novice
> Seq Scan on article  (cost=0.00..1.61 rows=1 width=8)


:-)
Replying to myself..

Notice the "cost" reported by the database. "0.00..1.61". That is fairly
low. Just to give you an example. I have a table with 259 rows. and I got:
-------
test=# explain select * from phones;
NOTICE:  QUERY PLAN:

Seq Scan on phones  (cost=0.00..20.00 rows=1000 width=36)

EXPLAIN
test=# vacuum analyze
test-# ;
VACUUM
test=# explain select * from phones;
NOTICE:  QUERY PLAN:

Seq Scan on phones  (cost=0.00..5.59 rows=259 width=36)
--------

0 to 5.59 for just 259 rows, yet yours is only 1.61. Possible the entire
table was in memory so there was no need to go to index.


pgsql-novice by date:

Previous
From: Francisco Reyes
Date:
Subject: Re: RE: Sizing of LARGE databases.
Next
From: Glenn Holmer
Date:
Subject: Re: PGSQL Hosting providers?