Re: Btree Index on PostgreSQL and Wiredtiger (MongoDB3.2) - Mailing list pgsql-hackers

From Kisung Kim
Subject Re: Btree Index on PostgreSQL and Wiredtiger (MongoDB3.2)
Date
Msg-id CABF0Rr3GACYsAkMvVMz7wn1GSTb+XM3W_gxs-Oio9Wf0bD81uA@mail.gmail.com
Whole thread Raw
In response to Re: Btree Index on PostgreSQL and Wiredtiger (MongoDB3.2)  (Lukas Fittl <lukas@fittl.com>)
Responses Re: Btree Index on PostgreSQL and Wiredtiger (MongoDB3.2)  (Mark Kirkwood <mark.kirkwood@catalyst.net.nz>)
List pgsql-hackers
Thank you for your information.
Here is the result:

After insertions:

ycsb=# select * from pgstatindex('usertable_pkey');
 version | tree_level | index_size | root_block_no | internal_pages | leaf_pages | empty_pages | deleted_pages | avg_leaf_density | leaf_fragmentation 
---------+------------+------------+---------------+----------------+------------+-------------+---------------+------------------+--------------------
       2 |          3 | 5488721920 |         44337 |           4464 |     665545 |           0 |             0 |               52 |                 11
(1 row)

After rebuild:


ycsb=# select * from pgstatindex('usertable_pkey');
 version | tree_level | index_size | root_block_no | internal_pages | leaf_pages | empty_pages | deleted_pages | avg_leaf_density | leaf_fragmentation 
---------+------------+------------+---------------+----------------+------------+-------------+---------------+------------------+--------------------
       2 |          3 | 3154296832 |         41827 |           1899 |     383146 |           0 |             0 |            90.08 |                  0


It seems like that rebuild has an effect to reduce the number of internal and leaf_pages and make more dense leaf pages.



On Wed, Aug 10, 2016 at 6:47 PM, Lukas Fittl <lukas@fittl.com> wrote:
On Wed, Aug 10, 2016 at 4:24 PM, Kisung Kim <kskim@bitnine.net> wrote:
When I used the index bloating estimation script in https://github.com/ioguix/pgsql-bloat-estimation,
the result is as follows:

Regardless of the issue at hand, it might make sense to verify these statistics using pgstattuple - those bloat estimation queries can be wildly off at times.


Best,
Lukas

--
Lukas Fittl

Skype: lfittl
Phone: +1 415 321 0630



--

                                                                                                                                                       

Bitnine Global Inc., Kisung Kim, Ph.D
https://sites.google.com/site/kisungresearch/
E-mail : kskim@bitnine.net
Office phone : 070-4800-5890, 408-606-8602
US Mobile phone : 408-805-2192

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: phrase search TS_phrase_execute code readability patch
Next
From: Venkata Balaji N
Date:
Subject: Re: Surprising behaviour of \set AUTOCOMMIT ON