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