From: Josh Berkus <josh@agliodbs.com>
To: pgsql-hackers@postgresql.org
Cc: Anjan Kumar. A. <anjankumar@cse.iitb.ac.in>
Cc: pgsql-chat@postgresql.org
Cc: pgsql-benchmarks@postgresql.org
Cc: pgsql-docs@postgresql.org
Subject: Re: [HACKERS] Please Help: PostgreSQL Query Optimizer
Date: Sun, 11 Dec 2005 11:26:18 -0800
Message-ID: <200512111126.18566.josh@agliodbs.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0512111610320.4525@nsl-33.cse.iitb.ac.in>
References: <Pine.LNX.4.61.0512111610320.4525@nsl-33.cse.iitb.ac.in>
Anjan,
> In our case we are reading pages from Main Memory File System, but not from
> Disk. Will it be sufficient, if we change the default values of above
> paramters in "src/include/optimizer/cost.h and
> src/backend/utils/misc/postgresql.conf.sample" as follows:
>
> random_page_cost = 4;
This should be dramatically lowered. It's supposed to represent the ratio of
seek-fetches to seq scans on disk. Since there's no disk, it should be a
flat 1.0. However, we are aware that there are flaws in our calculations
involving random_page_cost, such that the actual number for a system where
there is no disk cost would be lower than 1.0. Your research will hopefully
help us find these flaws.
> cpu_tuple_cost = 2;
> cpu_index_tuple_cost = 0.2;
> cpu_operator_cost = 0.05;
I don't see why you're increasing the various cpu_* costs. CPU costs would be
unaffected by the database being in memory. In general, I lower these by a
divisor based on the cpu speed; for example, on a dual-opteron system I lower
the defaults by /6. However, that's completely unrelated to using an MMDB.
So, other than random_page_cost, I don't know of other existing GUCs that
would be directly related to using a disk/not using a disk. How are you
handling shared memory and work memory?
I look forward to hearing more about your test!
--
Josh Berkus
Aglio Database Solutions
San Francisco
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-benchmarks@postgresql.org
Cc: josh@agliodbs.com, pgsql-hackers@postgresql.org, anjankumar@cse.iitb.ac.in, pgsql-chat@postgresql.org, pgsql-docs@postgresql.org
Subject: Re: [HACKERS] Please Help: PostgreSQL Query Optimizer
In-Reply-To: <200512111126.18566.josh@agliodbs.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox