From: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
---|---|
To: | Leonardo Francalanci <m_lists(at)yahoo(dot)it> |
Cc: | Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Fast insertion indexes: why no developments |
Date: | 2013-10-30 16:07:07 |
Message-ID: | CAMkU=1zE3T+kswVEaS6=UqOTzD7rm7cBpSdFnFHP82AhOq__AA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Oct 30, 2013 at 3:35 AM, Leonardo Francalanci <m_lists(at)yahoo(dot)it>wrote:
> > Presumably the data you are inserting isn't actually random. Please
> > describe the use case you are considering in more detail and some view
> > on how frequent that is, with some examples. Once we understand the
> > use case and agree it is important, we might solve problems.
>
>
> Collecting calls data for mobile network operators (and no, I don't work
> for the NSA...)
> Easily 5000-10000 inserts per second. Indexes in timestamp and ID (not a
> problem, always increasing so no btree issues) and in called #, calling #,
> imsi, imei. The last four obviously are random, out of millions of possible
> values.
> After the few first millions of records, the disks can't keep up with the
> amount of random writing in the indexes.
So, like, 3 minutes worth? How much RAM and shared_buffers do you have?
The index insertions should be fast until the size of the active part of
the indexes being inserted into exceeds shared_buffers by some amount (what
that amount is would depend on how much dirty data the kernel is willing to
allow in the page cache before it starts suffering anxiety about it). If
you have enough shared_buffers to make that last for 15 minutes, then you
shouldn't have a problem inserting with live indexes.
Cheers,
Jeff
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2013-10-30 16:12:18 | Re: appendStringInfo vs appendStringInfoString |
Previous Message | Merlin Moncure | 2013-10-30 15:53:08 | Re: Fast insertion indexes: why no developments |