pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: James Cloos <cloos@jhcloos.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Two tables or three?
Date: Sat, 29 Oct 2005 13:46:06 -0400
Message-ID: <11826.1130607966@sss.pgh.pa.us> (raw)
In-Reply-To: <m33bmkzbnj.fsf@lugabout.cloos.reno.nv.us>
References: <m33bmkzbnj.fsf@lugabout.cloos.reno.nv.us>

James Cloos <cloos@jhcloos.com> writes:
> I'm designing a schema for an app that requires two large blobs per
> row.  Given that querying does not hit those, I presume it is
> beneficial to move the blobs out of the main table.

You shouldn't contort your schema artificially in order to do that.

Postgres automatically stores wide fields out-of-line, so if "large"
means "more than a couple KB after compression" then the system will do
this behind the scenes and there's no need for you to do it.  See
http://developer.postgresql.org/docs/postgres/storage-toast.html

			regards, tom lane



view thread (3+ messages)  latest in thread

Message-ID: <11826.1130607966@sss.pgh.pa.us>
Permalink:  ../11826.1130607966@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/11826.1130607966@sss.pgh.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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, cloos@jhcloos.com
  Subject: Re: Two tables or three?
  In-Reply-To: <11826.1130607966@sss.pgh.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