pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Marc Mitchell <marcm@eisolution.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: INSERT performace.
Date: Sat, 26 Jan 2002 23:51:46 -0500 (EST)
Message-ID: <200201270451.g0R4pkf06265@candle.pha.pa.us> (raw)
In-Reply-To: <00a001c1a6d7$c833c520$7401a8c0@Home>

Marc Mitchell wrote:
> We have a fresh database and have begun to observe performance degradation
> for INSERTs as a table went from empty to 100,000-ish rows.  Initial
> INSERTs were sub second while after 30k rows, they were 1-3 seconds.
> 
> Note that we have done NO performance tuning yet nor are there any indexes
> on the tables.

Can we have PostgreSQL version and OS information?

> My question is about the way Postgres manages the organizational structure
> of the base table data.  From my Ingres background, I know that that
> product allows you to set the structure of the base data to be any of it's
> supported types (Hash, Heap, Btree, etc.) .  And my experience tells me
> that this can greatly effect INSERT performance and must be properly
> managed.  For example, you have to consider the allocation of data pages
> for hash and overflow and page fill factors for btrees to avoid excessive
> splits and balancing of index data pages.  Is there anything like this in
> Postgres?

Data is stored in flat heap files in PostgreSQL.  It is not like Ingres
where you can put a structure on the base table;  it is always heap, and
you add indexes as you need them.

Off the top of my head I can't guess why the INSERT would get slower
because it is merely putting data on the end of the table.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



view thread (12+ messages)  latest in thread

Message-ID: <200201270451.g0R4pkf06265@candle.pha.pa.us>
Permalink:  ../200201270451.g0R4pkf06265@candle.pha.pa.us/
Also on:    postgresql.org/message-id/200201270451.g0R4pkf06265@candle.pha.pa.us

 · 

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-admin@postgresql.org
  Cc: pgman@candle.pha.pa.us, marcm@eisolution.com
  Subject: Re: INSERT performace.
  In-Reply-To: <200201270451.g0R4pkf06265@candle.pha.pa.us>
  References: <00a001c1a6d7$c833c520$7401a8c0@Home> <200201270451.g0R4pkf06265@candle.pha.pa.us>

* 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