Re: [postgresql-it] Consiglio su separazione campi di una tabella

  • From: "Ing. Claudio Rossi" <ing.claudiorossi@xxxxxxxxx>
  • To: postgresql-it <postgresql-it@xxxxxxxxxxxxx>
  • Date: Wed, 2 Apr 2008 15:02:01 +0200

Per rispondere a Daniele, la cui risposta non avevo letto:

<<Qualcuno (un Rotellaro a caso...) sa cosa succede ad un campo
TOASTabile se la
dimensione del dato rientra nella pagina? Va lo stesso nel TOAST o viene
memorizzato nella pagina?>>

Per averne la certezza dovrei guardare il codice, ma dalla
documentazione ho il fondato sospetto che NON vada nel toast. I due
punti della documentazione che mi fanno pensare cio' sono:

1) TOAST usurps two bits of the varlena length word (the high-order
bits on big-endian machines, the low-order bits on little-endian
machines), thereby limiting the logical size of any value of a
TOAST-able data type to 1 GB (230 - 1 bytes). When both bits are zero,
the value is an ordinary un-TOASTed value of the data type, and the
remaining bits of the length word give the total datum size (including
length word) in bytes.

2) The TOAST code is triggered only when a row value to be stored in a
table is wider than TOAST_TUPLE_THRESHOLD bytes (normally 2 kB).

Infine non mi ricordavo della funzionalita' HOT di pgsql 8.3, devo
ancora aggiornarmi ma leggendo due righe velocemente sembra sopperisca
proprio al problema del post iniziale.

Other related posts: