pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pasman pasmaƄski <pasman.p@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Query uses incorrect index
Date: Wed, 22 Dec 2010 10:19:28 -0500
Message-ID: <5209.1293031168@sss.pgh.pa.us> (raw)
In-Reply-To: <AANLkTin5Mrjm48BYXuzLn_atpVN40KvhqjumH15QDLmu@mail.gmail.com>
References: <AANLkTin5Mrjm48BYXuzLn_atpVN40KvhqjumH15QDLmu@mail.gmail.com>

=?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



view thread (7+ messages)  latest in thread

Message-ID: <5209.1293031168@sss.pgh.pa.us>
Permalink:  ../5209.1293031168@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/5209.1293031168@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, pasman.p@gmail.com
  Subject: Re: Query uses incorrect index
  In-Reply-To: <5209.1293031168@sss.pgh.pa.us>

* 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