pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Greg Stark <gsstark@mit.edu>
To: Madison Kelly <linux@alteeve.com>
Cc: pgsql-performance@postgresql.org, Tom Lane <tgl@sss.pgh.pa.us>
Cc: Bruno Wolff III <bruno@wolff.to>
Subject: Re: Index ot being used
Date: 13 Jun 2005 16:53:51 -0400
Message-ID: <87hdg22d28.fsf@stark.xeocode.com> (raw )
In-Reply-To: <42ADD8DC.1000001@alteeve.com >
References: <1825.216.209.137.1.1118419819.squirrel@mail.alteeve.com >
<20050610155535.GO8451@tobias.nordicbet.com >
<42AC42CB.8050703@alteeve.com >
<24636.1118591783@sss.pgh.pa.us >
<42ACBC95.9020404@alteeve.com >
<20050613030001.GB17491@wolff.to >
<20050613031317.GA18988@wolff.to >
<42AD008D.4080600@alteeve.com >
<20050613035346.GA20703@wolff.to >
<42AD0B94.9090508@alteeve.com >
<20050613132852.GA31142@wolff.to >
<42ADC77B.7000007@alteeve.com >
<22127.1118686403@sss.pgh.pa.us >
<42ADD8DC.1000001@alteeve.com >
Madison Kelly <linux@alteeve.com> writes:
> So the index obiously provides a major performance boost! I just need to
> figure out how to tell the planner how to use it...
Be careful extrapolating too much from a single query in a single context.
Notably you might want to test the same query after not touching this table
for a little while. The index is probably benefiting disproportionately from
having you repeatedly running this one query and having the entire table in
cache.
That said, you should look at lowering random_page_cost. The default is 4 but
if this query is representative of your system's performance then much of your
database is in cache and the effective value will be closer to 1. Try 2 or
even 1.5 or 1.2.
But like I said, test other queries and test under more representative
conditions other than repeating a single query over and over.
--
greg
view thread (31+ messages) latest in thread
Message-ID: <87hdg22d28.fsf@stark.xeocode.com>
Permalink: ../87hdg22d28.fsf@stark.xeocode.com/
Also on: postgresql.org/message-id/87hdg22d28.fsf@stark.xeocode.com
copy link · copy postgr.es
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: gsstark@mit.edu, linux@alteeve.com, tgl@sss.pgh.pa.us, bruno@wolff.to
Subject: Re: Index ot being used
In-Reply-To: <87hdg22d28.fsf@stark.xeocode.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