Cube Index Size - Mailing list pgsql-hackers

From Nick Raj
Subject Cube Index Size
Date
Msg-id BANLkTikqaiPsC6R_xKOqZPeMqR57=KyUNw@mail.gmail.com
Whole thread Raw
List pgsql-hackers
Hi,<br /><br />Cube code provided by postgres contrib folder. It uses the NDBOX structure.<br />On creating index, it's
sizeincrease at a high rate.<br /><br />On inserting some tuple and creating indexes its behaviour is shown below.<br
/><br/>1. When there is only one tuple<br />    select pg_size_pretty(pg_relation_size('cubtest'));   //Table size
withoutindex <br /> pg_size_pretty <br />----------------<br /> 8192 bytes<br />(1 row)<br /><br />select
pg_size_pretty(pg_total_relation_size('cubtest'));//Table size with index<br />  pg_size_pretty <br
/>----------------<br/> 16 kB<br />(1 row)<br /><br />i.e. Index size in nearly 8kB<br /><br />2. When tuples are
20,000<br/><br />Table Size without index - 1.6 MB<br />Table Size with index - 11 MB<br />i.e. Index size is nearly
9.4MB<br /><br />3. When tuples are 5 lakh <br /><br /> Table Size without index - 40 MB<br /> Table Size with index -
2117MB<br /> i.e. Index size is nearly 2077 MB ~ 2GB<br />It is taking nearly 20-25 min for creating index for 5 lakh
tuples.<br/><br />Can some one tell me why index is becoming so large?<br />How to compress or reduce its size?<br
/><br/>Thanks<br /> Nick<br /> 

pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Getting a bug tracker for the Postgres project
Next
From: Joe Abbate
Date:
Subject: Re: Getting a bug tracker for the Postgres project