On Tue, 2006-04-04 at 15:32, Andrew Sullivan wrote: > On Tue, Apr 04, 2006 at 04:16:12PM -0400, Jan Wieck wrote: > > int4/int8 column one. Sure, that scan will be more expensive. But I > > think Andrew forgot that using an artificial serial column means that > > your origin and subscribers must maintain an additional index on all > > insert/update operations (and vacuum must clean it up after deletes). > > > > Andrew, do you have actual experience that it will perform better, or > > was that an assumption? > > No, I didn't forget; but I probably should have made this clearer. > The real question is what the use patterns are. > > For cases where you're likely to change _all_ the columns at once > (think INSERT only, for instance), the overhead for the additional > index is likely not worth it. > > For cases where you insert once, but then some (but not all) of the > values change over time, then depending on your hardware, use > patterns, and network speeds, the single column might be worth it. A > six-column key where 5 the items are longish pieces of text and one > is a status value, for instance, would be not only expensive to look > up: it will also be expensive to ship on the network.
Also, if the text values are large enough, they'll overrun the 1/3 of a block size limit and your insert / update will fail. _______________________________________________ Slony1-general mailing list [email protected] http://gborg.postgresql.org/mailman/listinfo/slony1-general
