Re: how to optimize postgres 8.1 - Mailing list pgsql-performance

From Markus Schaber
Subject Re: how to optimize postgres 8.1
Date
Msg-id 451E3DE9.80307@logix-tt.com
Whole thread Raw
In response to how to optimize postgres 8.1  (gurkan@resolution.com)
List pgsql-performance
Hi, Gurkan,

gurkan@resolution.com wrote:

> If I run the query below with informix, it gives cost=107.
> with postgres with additional indexes it gives cost=407, before the additional
> indexes it was even much slower

What are your real timing measurements, in a produciton-like setup in a
production-like load? That's the only kind of "benchmarking" that will
give you an useful comparison.

You cannot compare anything else.

Especially, you cannot compare those "artificial" cost estimator values,
as they are likely to be defined differently for PostgreSQL and Informix.

For PostgreSQL, they are relative values to the cost of reading a page
as part of a sequential scan. And those values are tunable - fiddle with
the random_page_cost and cpu_*_cost values in the postgresql.conf, and
you will see very different values compared to the 407 you see now, even
if the query plan stays equal.

Do you look up the definition of cost for Informix? Have you made shure
that they're comparable?

HTH,
Markus


--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org

pgsql-performance by date:

Previous
From: "Nimesh Satam"
Date:
Subject: Table not getting vaccumed.
Next
From: Tom Lane
Date:
Subject: Re: Table not getting vaccumed.