X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id AB831DB304 for ; Sat, 29 Oct 2005 14:46:11 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 27439-02 for ; Sat, 29 Oct 2005 17:46:08 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id A470FDB32D for ; Sat, 29 Oct 2005 14:46:08 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j9THk6h7011827; Sat, 29 Oct 2005 13:46:06 -0400 (EDT) To: James Cloos Cc: pgsql-sql@postgresql.org Subject: Re: Two tables or three? In-reply-to: References: Comments: In-reply-to James Cloos message dated "Sat, 29 Oct 2005 09:38:08 -0400" Date: Sat, 29 Oct 2005 13:46:06 -0400 Message-ID: <11826.1130607966@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.006 required=5 tests=[AWL=0.006] X-Spam-Score: 0.006 X-Spam-Level: X-Archive-Number: 200510/393 X-Sequence-Number: 23246 James Cloos 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