Re: keeping an index in memory

From: Rajarshi Guha <rguha(at)indiana(dot)edu>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: "Martijn van Oosterhout" <kleptog(at)svana(dot)org>, "pgsql-general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: keeping an index in memory
Date: 2007-10-23 02:05:00
Message-ID: C3EC4423-5391-4424-89E9-B1F4B367FC4C@indiana.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Oct 21, 2007, at 12:56 PM, Gregory Stark wrote:

> "Rajarshi Guha" <rguha(at)indiana(dot)edu> writes:
>
>> The table itself is about 10M rows corresponding to 14GB.
>
> Each row is on average 1.4kB ?

Yes, though some rows may 10's of Kb

> Perhaps you should send more details of the
> table definition and the typical size of each column. It's possible
> you have
> the columns you're selecting on being stored out of line
> ("toasted") which
> would hurt performance if you're often accessing many of those
> columns.

The SELECT is simply selecting the cube column and another text
column which just contains ID's. One of the columns can be large and
does involve toasting - but that column is never selected in the query

However, after running a few random queries, it appears that the
index is loaded into memory after which all my queries (I tested
10,000) run in under 10 sec. Even for relatively large bounding boxes
I get under 60 sec query times.

Thanks to everybody for pointing me in the right direction!

-------------------------------------------------------------------
Rajarshi Guha <rguha(at)indiana(dot)edu>
GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE
-------------------------------------------------------------------
The Heineken Uncertainty Principle:
You can never be sure how many beers you had last night.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrej Ricnik-Bay 2007-10-23 03:10:13 Re: Photos from the PostgreSQL Conference Fall 2007
Previous Message Adrian Klaver 2007-10-23 01:03:12 Re: Photos from the PostgreSQL Conference Fall 2007