Re: Batch update of indexes - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Batch update of indexes
Date
Msg-id CANP8+j+DMVfE5KAtRG9EtJMjEiNPFrX=z9Pp6SzBRTodMmFDtg@mail.gmail.com
Whole thread Raw
In response to Re: Batch update of indexes  (konstantin knizhnik <k.knizhnik@postgrespro.ru>)
Responses Re: Batch update of indexes  (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>)
List pgsql-hackers
On 21 January 2016 at 06:41, konstantin knizhnik <k.knizhnik@postgrespro.ru> wrote:
 
Certainly for B-Tree we can organize insert buffer (or pending list) as sorted array or also as a tree.
But in both case complexity of search in this buffer will be O(log(N)), not O(1).

You are right; search within this buffer is O(log(N)). But we can test whether we need to search in the buffer at all with O(1). 

--
Simon Riggs                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

pgsql-hackers by date:

Previous
From: konstantin knizhnik
Date:
Subject: Re: Batch update of indexes
Next
From: Andres Freund
Date:
Subject: Re: checkpointer continuous flushing