pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jacques Caron <jc@directinfos.com>
To: Praveen Raja <praveen.raja@netlight.se>
Cc: pgsql-performance@postgresql.org
Subject: Re: Insert performance vs Table size
Date: Mon, 27 Jun 2005 13:40:13 +0200
Message-ID: <6.2.0.14.0.20050627133508.05df6eb0@pop.interactivemediafactory.net> (raw)
In-Reply-To: <001201c57b0a$beb2b780$4c0ca8c0@sto.netlight.se>
References: <41821.193.138.218.24.1119696327.squirrel@www.aldratech.com>
	<001201c57b0a$beb2b780$4c0ca8c0@sto.netlight.se>

Hi,

At 13:24 27/06/2005, Praveen Raja wrote:
>I'm wondering if and how the size of a table affects speed of inserts
>into it? What if the table has indexes, does that alter the answer?

Many parameters will affect the result:
- whether there are any indexes (including the primary key, unique 
constraints...) to update or not
- whether there are any foreign keys from or to that table
- the size of the rows
- whether the table (or at least the bits being updated) fit in RAM or not
- whether the table has "holes" (due to former updates/deletes and vacuum) 
and how they are placed
- and probably a bunch of other things...

Obviously, if you have an append-only (no updates, no deletes) table with 
no indexes and no foreign keys, the size of the table should not matter 
much. As soon as one of those conditions is not met table size will have an 
impact, probably small as long as whatever is needed can be held in RAM, a 
lot bigger once it's not the case.

Hope that helps,

Jacques.





view thread (8+ messages)  latest in thread

Message-ID: <6.2.0.14.0.20050627133508.05df6eb0@pop.interactivemediafactory.net>
Permalink:  ../6.2.0.14.0.20050627133508.05df6eb0@pop.interactivemediafactory.net/
Also on:    postgresql.org/message-id/6.2.0.14.0.20050627133508.05df6eb0@pop.interactivemediafactory.net

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: jc@directinfos.com, praveen.raja@netlight.se
  Subject: Re: Insert performance vs Table size
  In-Reply-To: <6.2.0.14.0.20050627133508.05df6eb0@pop.interactivemediafactory.net>
  References: <41821.193.138.218.24.1119696327.squirrel@www.aldratech.com> <001201c57b0a$beb2b780$4c0ca8c0@sto.netlight.se> <6.2.0.14.0.20050627133508.05df6eb0@pop.interactivemediafactory.net>

* 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