Re: Two tables or three?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: James Cloos <cloos(at)jhcloos(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Two tables or three?
Date: 2005-10-29 17:46:06
Message-ID: 11826.1130607966@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

James Cloos <cloos(at)jhcloos(dot)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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message James Cloos 2005-10-29 23:59:30 Re: Two tables or three?
Previous Message Bruno Wolff III 2005-10-29 17:20:36 Re: Aggregate versus lineitem report