Skip site navigation (1) Skip section navigation (2)

Re: Fwd: Indexes (Disk space)

From: Aldor <an(at)mediaroot(dot)de>
To: jose fuenmayor <jafn82(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Fwd: Indexes (Disk space)
Date: 2005-08-23 19:39:34
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
select * from pg_class;


select relname, relpages from pg_class where relname = '[index-name]';

the pages give you the information about the space the index uses, a 
page has 8kb.

[...]Every table and index is stored as an array of pages of a fixed 
size (usually 8Kb, although a different page size can be selected when 
compiling the server). In a table, all the pages are logically 
equivalent, so a particular item (row) can be stored in any page. In 
indexes, the first page is generally reserved as a metapage holding 
control information, and there may be different types of pages within 
the index, depending on the index access method. [...]


jose fuenmayor wrote:
> ---------- Forwarded message ----------
> From: jose fuenmayor <jafn82(at)gmail(dot)com>
> Date: Aug 22, 2005 1:37 PM
> Subject: Indexes (Disk space)
> To: pgsql-admin(at)postgresql(dot)org
> Hi all,
> I have the following question.
> Is there anyway for me to know how much space on disk will ocupy an
> index, created in a determined row or rows of a table?, anything like
> a rule, formula, calculation? that allow me to know in advance how
> much space will the index use before actually created it.
> I aprecciate all the help you can give me
> Thanks in advance.
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
>        message can get through to the mailing list cleanly

In response to


pgsql-admin by date

Next:From: sandhyaDate: 2005-08-24 06:20:24
Subject: Reg:sql command
Previous:From: Jim C. NasbyDate: 2005-08-23 18:34:36
Subject: Re: sleep?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group