Re: Query uses incorrect index - Mailing list pgsql-performance

From Tom Lane
Subject Re: Query uses incorrect index
Date
Msg-id 5209.1293031168@sss.pgh.pa.us
Whole thread Raw
In response to Re: Query uses incorrect index  (pasman pasmański <pasman.p@gmail.com>)
List pgsql-performance
=?ISO-8859-2?Q?pasman_pasma=F1ski?= <pasman.p@gmail.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

pgsql-performance by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Query uses incorrect index
Next
From: pasman pasmański
Date:
Subject: Re: Query uses incorrect index