Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Hackers > proposal for sm...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 14 Topic 9558 of 10966
Post > Topic >>

proposal for smaller indexes on index-ordered tables

by jwbaker@[EMAIL PROTECTED] ("Jeffrey Baker") Jun 24, 2008 at 01:34 PM

------=_Part_20822_7616881.1214339667192
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

The way I read it, the current btree index stores the index value and the
TID of every tuple having that value.  When you have a table with three
columns, you index one of them and you get an index which is practically
as
large as the table itself.

Supposing the table is generally or strictly ordered by the column to be
indexed, it would be more compact if the index stored ranges of tuples.
Instead of storing the TID of every tuple with that value, the index would
store a first and last TID, between which all tuples have the value.

Example: table with one million rows indexed on a column having one
thousand
distinct values.  Table is in-order by the indexed column.  The
traditional
index would contain a million TIDs, whereas a range index would contain
only
two thousand.  The range index would be 500 times smaller, more likely to
be
cached, etc.

Thoughts?

-jwb

------=_Part_20822_7616881.1214339667192
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

The way I read it, the current btree index stores the index value and the
TID of every tuple having that value.&nbsp; When you have a table with
three columns, you index one of them and you get an index which is
practically as large as the table itself.<br>
<br>Supposing the table is generally or strictly ordered by the column to
be indexed, it would be more compact if the index stored ranges of
tuples.&nbsp; Instead of storing the TID of every tuple with that value,
the index would store a first and last TID, between which all tuples have
the value.<br>
<br>Example: table with one million rows indexed on a column having one
thousand distinct values.&nbsp; Table is in-order by the indexed
column.&nbsp; The traditional index would contain a million TIDs, whereas
a range index would contain only two thousand.&nbsp; The range index would
be 500 times smaller, more likely to be cached, etc.<br>
<br>Thoughts?<br><br>-jwb<br>

------=_Part_20822_7616881.1214339667192--
 




 14 Posts in Topic:
proposal for smaller indexes on index-ordered tables
jwbaker@[EMAIL PROTECTED]  2008-06-24 13:34:27 
Re: proposal for smaller indexes on index-ordered tables
jonah.harris@[EMAIL PROTE  2008-06-24 16:50:14 
Re: proposal for smaller indexes on index-ordered tables
zb@[EMAIL PROTECTED] (Zo  2008-06-24 22:59:48 
Re: proposal for smaller indexes on index-ordered tables
jwbaker@[EMAIL PROTECTED]  2008-06-24 14:08:43 
Re: proposal for smaller indexes on index-ordered tables
zb@[EMAIL PROTECTED] (Zo  2008-06-24 23:36:39 
Re: proposal for smaller indexes on index-ordered tables
tgl@[EMAIL PROTECTED] (T  2008-06-24 17:38:30 
Re: proposal for smaller indexes on index-ordered tables
jwbaker@[EMAIL PROTECTED]  2008-06-24 14:47:41 
Re: proposal for smaller indexes on index-ordered tables
tgl@[EMAIL PROTECTED] (T  2008-06-24 17:54:39 
Re: proposal for smaller indexes on index-ordered
Kevin.Grittner@[EMAIL PRO  2008-06-24 17:01:15 
Re: proposal for smaller indexes on index-ordered tables
tgl@[EMAIL PROTECTED] (T  2008-06-24 18:08:24 
Re: proposal for smaller indexes on index-ordered tables
jwbaker@[EMAIL PROTECTED]  2008-06-24 15:15:54 
Re: proposal for smaller indexes on index-ordered tables
tgl@[EMAIL PROTECTED] (T  2008-06-24 23:03:16 
Re: proposal for smaller indexes on index-ordered tables
jcasanov@[EMAIL PROTECTED  2008-06-24 19:17:58 
Re: proposal for smaller indexes on index-ordered tables
heikki@[EMAIL PROTECTED]   2008-06-25 11:51:29 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 13:39:51 CST 2008.