Re: Two tables or three? - Mailing list pgsql-sql

From Tom Lane
Subject Re: Two tables or three?
Date
Msg-id 11826.1130607966@sss.pgh.pa.us
Whole thread Raw
In response to Two tables or three?  (James Cloos <cloos@jhcloos.com>)
Responses Re: Two tables or three?  (James Cloos <cloos@jhcloos.com>)
List pgsql-sql
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


pgsql-sql by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Aggregate versus lineitem report
Next
From: James Cloos
Date:
Subject: Re: Two tables or three?