Re: storage space
От
Tom Lane
Тема
Re: storage space
Дата
Msg-id
14503.1022811359@sss.pgh.pa.us
Ответ на
storage space (Don V. Soledad)
Список
Дерево обсуждения
storage space "Don V. Soledad" <don.soledad@uratex.com.ph>
Re: storage space Tom Lane <tgl@sss.pgh.pa.us>
"Don V. Soledad" writes: > with the above structures, is it advisable to separate "notes" table from > "quantities" to save storage space because an invoice to us may or may not > have note/s? I doubt it. I'd recommend *one* notes column (allow it to contain newlines if you want multiline notes, rather than hardwiring a maximum number of lines). Put it in the main table and let it be NULL (or possibly an empty string) if there's no note. It'll cost you an extra 4 bytes per row (or no extra space at all, if you use NULL and there's already at least one other NULL in the row). Avoiding having to join the extra table seems well worth that. One question is whether you intend to attach a note to each item of each order, or only to a whole order. The quantities table is not the place if you want the latter. regards, tom lane
В списке pgsql-general по дате отправления