Re: Index ot being used

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Madison Kelly <linux(at)alteeve(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruno Wolff III <bruno(at)wolff(dot)to>
Subject: Re: Index ot being used
Date: 2005-06-13 20:53:51
Message-ID: 87hdg22d28.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Madison Kelly <linux(at)alteeve(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2005-06-13 21:00:04 Re: Index ot being used
Previous Message Bruno Wolff III 2005-06-13 20:45:59 Re: Index ot being used