Are there performance advantages in storing bulky field in separate table?

From: Ian Mayo <ianmayo(at)tesco(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Are there performance advantages in storing bulky field in separate table?
Date: 2009-04-08 15:26:09
Message-ID: a0a470f10904080826s16f5b7b7n51aeb77f5d63d079@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,
I'm designing a Postgresql database, and would appreciate this design advice.

I've got a fairly straightforward table that's similar to a blog table
(entryId, date, title, author, etc). There is, however, the
requirement to allow a single, fairly bulky binary attachment to
around 1% of the rows.

There will be a few million rows, and I value efficient searches by
date, title, and author.

Would there be a performance advantage in storing the attachment in a
separate table - linked by entryId foreign key? Or shall I just
include it as an ALLOW NULL field my blog table?

[of course, I'd appreciate redirection to the 'right' list if this is
the wrong one].

cheers,
Ian

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2009-04-08 15:43:09 Re: PGS Tuning Wizard destroys my login
Previous Message Steve Crawford 2009-04-08 15:25:20 Re: Table has 22 million records, but backup doesn't see them