Re: Query uses incorrect index

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pasman pasmański <pasman(dot)p(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Query uses incorrect index
Date: 2010-12-22 15:19:28
Message-ID: 5209.1293031168@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

=?ISO-8859-2?Q?pasman_pasma=F1ski?= <pasman(dot)p(at)gmail(dot)com> writes:
> Thanks for reply.
> I tested random changes and query runs fastest after:

> set seq_page_cost = 0.1;
> set random_page_cost = 0.1;
> cpu_operator_cost = 0.01

As a general rule, "optimizing" those settings on the basis of testing a
single query is a great way to send your overall performance into the
tank --- especially since repeating a single query will be heavily
biased by cache effects. You need to look at a representative sample of
all your queries across all your data.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message pasman pasmański 2010-12-22 16:01:08 Re: Query uses incorrect index
Previous Message Kevin Grittner 2010-12-22 12:31:28 Re: Query uses incorrect index