Re: caching indexes and pages? - Mailing list pgsql-performance

From A. Kretschmer
Subject Re: caching indexes and pages?
Date
Msg-id 20090122070136.GB17524@a-kretschmer.de
Whole thread Raw
In response to caching indexes and pages?  (Thomas Finneid <tfinneid@fcon.no>)
List 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

pgsql-performance by date:

Previous
From: Thomas Finneid
Date:
Subject: caching indexes and pages?
Next
From: Thomas Markus
Date:
Subject: Re: caching indexes and pages?