pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: John Moore <postgres@tinyvital.com>
Cc: Postgresql Admin <pgsql-admin@postgresql.org>
Subject: Re: Performance impact of record sizes
Date: Thu, 4 Jul 2002 15:47:28 -0400 (EDT)
Message-ID: <200207041947.g64JlSM04801@candle.pha.pa.us> (raw)
In-Reply-To: <5.1.1.6.2.20020704115439.02202480@pop3.norton.antivirus>

John Moore wrote:
> We have a need to store text data which typically is just a hundred or so 
> bytes, but in some cases may extend to a few thousand. Our current field 
> has a varchar of 1024, which is not large enough. Key data is fixed sized 
> and much smaller in this same record.
> 
> Our application is primarily transaction oriented, which means that records 
> will normally be fetched via random access, not sequential scans.
> 
> The question  is: what size thresholds exist? I assume that there is a 
> "page" size over which the record will be split into more than one. What is 
> that size, and does the spill cost any more or less than I had split the 
> record into two or more individual records in order to handle the same data?
> 
> Obviously, the easiest thing for me to do is just set the varchar to 
> something big (say - 10K) but I don't want to do this without understanding 
> the OLTP performance impact.
> 

If you don't want a limit, use TEXT.  Long values are automatically
stored in TOAST tables to avoid performance problems with sequential
scans over long row values.

-- 
  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 (13+ messages)  latest in thread

Message-ID: <200207041947.g64JlSM04801@candle.pha.pa.us>
Permalink:  ../200207041947.g64JlSM04801@candle.pha.pa.us/
Also on:    postgresql.org/message-id/200207041947.g64JlSM04801@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, postgres@tinyvital.com
  Subject: Re: Performance impact of record sizes
  In-Reply-To: <200207041947.g64JlSM04801@candle.pha.pa.us>
  References: <5.1.1.6.2.20020704115439.02202480@pop3.norton.antivirus> <200207041947.g64JlSM04801@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