Re: caching indexes and pages?

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: caching indexes and pages?
Date: 2009-01-22 07:01:36
Message-ID: 20090122070136.GB17524@a-kretschmer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

In response to Thomas Finneid :
>
> Hi I am developing a database and have a couple of questions I havent
> found an answer to yet.
>
> 1) how do I find the size of an index, i.e. the size on disk?

http://www.postgresql.org/docs/8.3/interactive/functions-admin.html
http://andreas.scherbaum.la/blog/archives/282-table-size,-database-size.html

>
> 2) I have a query that is taking a long time to complete because the

How long is a long time? *g*

> table is about 120GB large. Its only returning 2000 rows, so in
> principle it should be fast. But because the data is spread across the
> table, I am assuming it needs to do a lot of disk access to fetch the
> appropriate pages. Since the amount of data is so large I am also

Please execute your query with an additionally 'explain analyse select
...' and look at the output. Maybe there are no propper index for your
select.

Regards, Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Thomas Markus 2009-01-22 07:06:12 Re: caching indexes and pages?
Previous Message M. Edward (Ed) Borasky 2009-01-22 06:23:45 Re: linux, memory (mis)accounting/reporting, and the planner/optimizer