From: Greg Smith <greg@2ndquadrant.com>
To: jd@commandprompt.com
Cc: Ogden <lists@darkstatic.com>
Cc: Jesper Krogh <jesper@krogh.cc>
Cc: Kenneth Marshall <ktm@rice.edu>
Cc: pgsql-performance@postgresql.org
Subject: Re: Query much faster with enable_seqscan=0
Date: Tue, 21 Sep 2010 15:16:57 -0400
Message-ID: <4C9904A9.5080301@2ndquadrant.com> (raw)
In-Reply-To: <1285096031.15919.68.camel@jd-desktop.unknown.charter.com>
References: <0D5B9ED0-00C3-4EEB-8336-0B2F8A884620@darkstatic.com>
<20100921180618.GI17152@aart.is.rice.edu>
<D707045F-C689-403A-9729-8DBCC39F53A1@darkstatic.com>
<4C98FEA2.8030607@krogh.cc>
<3062DF4E-7460-4487-818A-BF77F176E501@darkstatic.com>
<1285096031.15919.68.camel@jd-desktop.unknown.charter.com>
Joshua D. Drake wrote:
> PostgreSQL's defaults are based on extremely small and some would say
> (non production) size databases. As a matter of course I always
> recommend bringing seq_page_cost and random_page_cost more in line.
>
Also, they presume that not all of your data is going to be in memory,
and the query optimizer needs to be careful about what it does and
doesn't pull from disk. If that's not the case, like here where there's
8GB of RAM and a 7GB database, dramatic reductions to both seq_page_cost
and random_page_cost can make sense. Don't be afraid to think lowering
below 1.0 is going too far--something more like 0.01 for sequential and
0.02 for random may actually reflect reality here.
--
Greg Smith, 2ndQuadrant US greg@2ndQuadrant.com Baltimore, MD
PostgreSQL Training, Services and Support www.2ndQuadrant.us
Author, "PostgreSQL 9.0 High Performance" Pre-ordering at:
https://www.packtpub.com/postgresql-9-0-high-performance/book
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: greg@2ndquadrant.com, jd@commandprompt.com, lists@darkstatic.com, jesper@krogh.cc, ktm@rice.edu
Subject: Re: Query much faster with enable_seqscan=0
In-Reply-To: <4C9904A9.5080301@2ndquadrant.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