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

Re: Why creating GIN table index is so slow than inserting data into empty table with the same index?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Sergey Burladyan <eshkinkot(at)gmail(dot)com>, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Teodor Sigaev <teodor(at)sigaev(dot)ru>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Why creating GIN table index is so slow than inserting data into empty table with the same index?
Date: 2009-03-24 13:45:13
Message-ID: 26264.1237902313@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
> Tom Lane wrote:
>> I think a reasonable solution for this might be to keep an eye on
>> maxdepth and force a flush if that gets too large (more than a few
>> hundred, perhaps?).  Something like this:

> I fooled around with a balanced tree, which solved the problem but 
> unfortunately made the unsorted case slower.

Yeah, rebalancing the search tree would fix that, but every balanced
tree algorithm I know about is complicated, slow, and needs extra
memory.  It's really unclear that it'd be worth the trouble for a
transient data structure like this one.

			regards, tom lane

In response to

pgsql-performance by date

Next:From: Joe UhlDate: 2009-03-24 18:47:36
Subject: Re: High CPU Utilization
Previous:From: Heikki LinnakangasDate: 2009-03-24 11:07:34
Subject: Re: Why creating GIN table index is so slow than inserting data into empty table with the same index?

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