Re: Modeling a table with arbitrary columns - Mailing list pgsql-performance

From Віталій Тимчишин
Subject Re: Modeling a table with arbitrary columns
Date
Msg-id 331e40660910300318q1ad33d1bifa0fbe730f38c0c7@mail.gmail.com
Whole thread Raw
In response to Modeling a table with arbitrary columns  (Andreas Hartmann <andreas@apache.org>)
List pgsql-performance


2009/10/29 Andreas Hartmann <andreas@apache.org>
Hi everyone,

I want to model the following scenario for an online marketing application:

Users can create mailings. The list of recipients can be uploaded as spreadsheets with arbitrary columns (each row is a recipient). I expect the following maximum quantities the DB will contain:

I see basically two approaches to store the recipients:

A) A single table with a fixed number of generic columns. If the spreadsheet has less columns than the table, the values will be null.

B) Two tables, one for the recipients and one for the values:

One more option is to use arrays (and single table).

pgsql-performance by date:

Previous
From: Greg Smith
Date:
Subject: Re: AMD, Intel and RAID controllers
Next
From: Grzegorz Jaśkiewicz
Date:
Subject: Re: sub-select in IN clause results in sequential scan