From: Aaron Guyon <battlemage@gmail.com>
To: pgsql-performance@postgresql.org
Subject: Re: Postgres 8.3, four times slower queries?
Date: Fri, 6 Mar 2009 10:50:22 -0500
Message-ID: <f0afbb9b0903060750v17fff813if1cbc6df10813c48@mail.gmail.com> (raw)
In-Reply-To: <1236275907.6979.40.camel@jd-laptop.pragmaticzealot.org>
References: <f0afbb9b0903021618w616f1158t84dbf119f0b72c70@mail.gmail.com>
<2870.1236050632@sss.pgh.pa.us>
<f0afbb9b0903030931g7b219137n2954cf058d523e52@mail.gmail.com>
<1236275907.6979.40.camel@jd-laptop.pragmaticzealot.org>
On Thu, Mar 5, 2009 at 12:58 PM, Joshua D. Drake <jd@commandprompt.com>wrote:
> What happens if you do this:
>
> SET cpu_tuple_cost TO '0.5';
> SET cpu_index_tuple_cost TO '0.5';
> EXPLAIN ANALYZE 8.3 query....
>
> Next try this:
>
> SET cpu_tuple_cost TO '0.5';
> SET cpu_index_tuple_cost TO '0.5';
> SET seq_page_cost TO '4.0';
> SET random_page_cost TO '1.0';
> EXPLAIN ANALYZE 8.3 query....
>
> And then this:
>
> SET cpu_tuple_cost TO '0.5';
> SET cpu_index_tuple_cost TO '0.5';
> SET seq_page_cost TO '4.0';
> SET random_page_cost TO '1.0';
> SET effective_cache_size TO '3000MB';
> EXPLAIN ANALYZE 8.3 query....
>
These three are pretty much the same in terms of performance. I stayed with
the first one (cpu_tuple_cost = 0.5 and cpu_index_tuple_cost = 0.5). As
shown earlier, it gives a result similar or slightly better than 8.2.12 in
terms of performance and response time. The explain analyze shows that the
query no longer causes postgreSQL to uses hashes, but indexes instead which
boosted the performance of the query from ~1200 ms to ~600 ms.
Thank you everyone for all the help and feedback on this issue.
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-performance@postgresql.org
Cc: battlemage@gmail.com
Subject: Re: Postgres 8.3, four times slower queries?
In-Reply-To: <f0afbb9b0903060750v17fff813if1cbc6df10813c48@mail.gmail.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