Re: how to optimize postgres 8.1

From: Markus Schaber <schabi(at)logix-tt(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Cc: gurkan(at)resolution(dot)com
Subject: Re: how to optimize postgres 8.1
Date: 2006-09-30 09:50:33
Message-ID: 451E3DE9.80307@logix-tt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi, Gurkan,

gurkan(at)resolution(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2006-09-30 16:45:50 Re: Table not getting vaccumed.
Previous Message Nimesh Satam 2006-09-30 09:25:54 Table not getting vaccumed.