pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark Thornton <mthornton@optrak.com>
To: Claudio Freire <klaussfreire@gmail.com>
Cc: Jon Nelson <jnelson+pgsql@jamponi.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: very very slow inserts into very large table
Date: Mon, 16 Jul 2012 20:16:11 +0100
Message-ID: <5004687B.8080908@optrak.com> (raw)
In-Reply-To: <CAGTBQpbvbLk+jdtKFxKcVAQZoPx9pxgr+QK_37YJCw-cKuiHKQ@mail.gmail.com>
References: <CAKuK5J1wY9NoZHxOaTf+=WNhgfn1uEU19Mw5dLvZh_NWpc8+tw@mail.gmail.com>
	<50041FD1.5070002@optrak.com>
	<CAEV0TzDnzop=dZMwynDzPhukiNkksZfW7dzN4O-co43ZTWchNw@mail.gmail.com>
	<CAKuK5J2i5XF1828+fB6Z=Yfkxz1iq9OiR-AkcAAuDA+kgfQ7LQ@mail.gmail.com>
	<5004647B.3090308@optrak.com>
	<CAGTBQpbvbLk+jdtKFxKcVAQZoPx9pxgr+QK_37YJCw-cKuiHKQ@mail.gmail.com>

On 16/07/12 20:08, Claudio Freire wrote:
> On Mon, Jul 16, 2012 at 3:59 PM, Mark Thornton <mthornton@optrak.com> wrote:
>> 4. The most efficient way for the database itself to do the updates would be
>> to first insert all the data in the table, and then update each index in
>> turn having first sorted the inserted keys in the appropriate order for that
>> index.
> Actually, it should create a temporary index btree and merge[0] them.
> Only worth if there are really a lot of rows.
>
> [0] http://www.ccs.neu.edu/home/bradrui/index_files/parareorg.pdf
I think 93 million would qualify as a lot of rows. However does any 
available database (commercial or open source) use this optimisation.

Mark





view thread (14+ messages)  latest in thread

Message-ID: <5004687B.8080908@optrak.com>
Permalink:  ../5004687B.8080908@optrak.com/
Also on:    postgresql.org/message-id/5004687B.8080908@optrak.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: mthornton@optrak.com, klaussfreire@gmail.com, jnelson+pgsql@jamponi.net
  Subject: Re: very very slow inserts into very large table
  In-Reply-To: <5004687B.8080908@optrak.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox