Hi Igor: On Mon, Jul 20, 2015 at 4:56 PM, Igor Neyman <ineyman@xxxxxxxxxxxxxx> wrote: > Well, there is a caveat. > If I create table and couple indexes like this: .. > and populate them: > and then check the size of the indexes: > for "select pg_relation_size('U1')" I get 2834432 > while " select pg_relation_size('U2')" returns 2285568. > So, index based on randomly populated column is bigger than the one based on sequentially populated. > But, on the other hand, after: > reindex table test_index_size; > both indexes are of the same size: 2260992. I would totally expect this. On reindex you get the values from a tree walk, so both of them come in order, and being a reindex ( where you know in advance the full set of values, so you can plan ahead where to put the leaves, how many levels you need and how many splits ) you get an even bigger advantage from the squential insertion case. Francisco Olarte. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general