pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark Kirkwood <markir@paradise.net.nz>
To: Adonias Malosso <malosso@gmail.com>
Cc: Claus Guttesen <kometen@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: 4s query want to run faster
Date: Fri, 22 Feb 2008 11:59:06 +1300
Message-ID: <47BE023A.6000905@paradise.net.nz> (raw)
In-Reply-To: <8a5d3c890802211323j2a7e2ebdye42f988222046e44@mail.gmail.com>
References: <8a5d3c890802211248k7d9dfbb5ndd645358a84130a7@mail.gmail.com>
	<b41c75520802211310j40c51014y5d6fbc56bf38c467@mail.gmail.com>
	<8a5d3c890802211311m5fab66d6q865fda1737e47802@mail.gmail.com>
	<b41c75520802211316q35954881q26a6a6058efefcbf@mail.gmail.com>
	<8a5d3c890802211323j2a7e2ebdye42f988222046e44@mail.gmail.com>

The other parameter you might want to look at is effective_cache_size - 
increasing it will encourage index use. On a machine with 16GB the 
default is probably too small (there are various recommendations about 
how to set this ISTR either Scott M or Greg Smith had a page somewhere 
that covered this quite well - guys?).

Obviously, decreasing random_page_cost fixed this query for you, but if 
find yourself needing to tweak it again for other queries, then look at 
changing effective_cache_size.

Cheers

Mark


Adonias Malosso wrote:
> Set random_page_cost = 2 solved the problem. thanks
>




view thread (12+ messages)  latest in thread

Message-ID: <47BE023A.6000905@paradise.net.nz>
Permalink:  ../47BE023A.6000905@paradise.net.nz/
Also on:    postgresql.org/message-id/47BE023A.6000905@paradise.net.nz

 · 

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: markir@paradise.net.nz, malosso@gmail.com, kometen@gmail.com
  Subject: Re: 4s query want to run faster
  In-Reply-To: <47BE023A.6000905@paradise.net.nz>

* 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