pg.ddx.io pgsql-performance@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Greg Smith <greg@2ndquadrant.com>
Cc: jd@commandprompt.com, 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 19:24:47 -0400
Message-ID: <11632.1285111487@sss.pgh.pa.us> (raw)
In-Reply-To: <4C9904A9.5080301@2ndquadrant.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>
<4C9904A9.5080301@2ndquadrant.com>
Greg Smith <greg@2ndquadrant.com> writes:
> 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.
If you are tuning for an all-in-RAM situation, you should set
random_page_cost equal to seq_page_cost (and usually set both smaller
than 1). By definition, those costs are equal if you're fetching from
RAM. If it's only mostly-in-RAM then keeping random_page_cost a bit
higher makes sense.
regards, tom lane
view thread (16+ messages) latest in thread
Message-ID: <11632.1285111487@sss.pgh.pa.us> Permalink: ../11632.1285111487@sss.pgh.pa.us/ Also on: postgresql.org/message-id/11632.1285111487@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, greg@2ndquadrant.com, lists@darkstatic.com, jesper@krogh.cc, ktm@rice.edu Subject: Re: Query much faster with enable_seqscan=0 In-Reply-To: <11632.1285111487@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