Re: test / live environment, major performance difference - Mailing list pgsql-performance

From Michael Glaesemann
Subject Re: test / live environment, major performance difference
Date
Msg-id 6336D034-24D7-47B3-8690-9E7561E5432C@seespotcode.net
Whole thread Raw
In response to Re: test / live environment, major performance difference  (Christo Du Preez <christo@mecola.com>)
List pgsql-performance
On Jun 12, 2007, at 8:32 , Christo Du Preez wrote:

> I have noticed that my server never uses indexing. No matter what I
> do.
>
> As an example I took a table with about 650 rows, having a parentid
> field with an index on parentid.
>
> EXPLAIN ANALYZE
> SELECT *
>   FROM layertype
> where parentid = 300;

The planner weighs the cost of the different access methods and
choses the one that it believes is lowest in cost. An index scan is
not always faster than a sequential scan. With so few rows, it's
probably faster for the server to read the whole table rather than
reading the index and looking up the corresponding row. If you want
to test this, you can set enable_seqscan to false and try running
your query again.

http://www.postgresql.org/docs/8.2/interactive/runtime-config-
query.html#RUNTIME-CONFIG-QUERY-ENABLE

Michael Glaesemann
grzm seespotcode net



pgsql-performance by date:

Previous
From: Reid Thompson
Date:
Subject: Re: test / live environment, major performance difference
Next
From: Gregory Stark
Date:
Subject: Re: test / live environment, major performance difference