Re: test / live environment, major performance difference

From: Christo Du Preez <christo(at)mecola(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: test / live environment, major performance difference
Date: 2007-06-12 13:32:40
Message-ID: 466EA078.20601@mecola.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Good day,

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;

On my laptop the explain analyze looks like this:

"Index Scan using fki_layertype_parentid on layertype (cost=0.00..8.27
rows=1 width=109)"
" Index Cond: (parentid = 300)"

and on the problem server:

"Seq Scan on layertype (cost=0.00..20.39 rows=655 width=110)"
" Filter: (parentid = 300)"

.........

I have dropped the index, recreated it, vacuumed the table, just about
everything I could think of, And there is just no way I can get the
query planner to use the index.

PostgreSQL 8.2.3 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.1.2
20061115 (prerelease) (SUSE Linux)
POSTGIS="1.2.1" GEOS="3.0.0rc4-CAPI-1.3.3" PROJ="Rel. 4.5.0, 22 Oct
2006" USE_STATS

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Reid Thompson 2007-06-12 13:45:20 Re: test / live environment, major performance difference
Previous Message Christo Du Preez 2007-06-12 07:38:06 Re: test / live environment, major performance difference