By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,369 Members | 1,218 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,369 IT Pros & Developers. It's quick & easy.

finding out actual tuple size

P: n/a
Hi All,

1. I have been reading and the max size of a tuple is 8K.
I have also read that I can it to a larger size in some config file. Where is
this file? is it called pg_config.h and is the variable called BLKSZ??

2. Is there a way I can find the actual size of the tuple? Do you go into each
column and find the length of each value and sum it up? I am out of ideas..

if someone knows how please shine some light on my situation..

thanks

--------------------------------
Linh Luong
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 22 '05 #1
Share this Question
Share on Google+
3 Replies

P: n/a
On Tue, Feb 17, 2004 at 03:39:25PM -0700, Linh Luong wrote:
Hi All,

1. I have been reading and the max size of a tuple is 8K.


That hasn't been true for ages. Use a newer PostgreSQL; any modern
one will have the TOAST capability and won't have this limitation.

A

--
Andrew Sullivan

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 22 '05 #2

P: n/a
On Tue, 17 Feb 2004, Linh Luong wrote:
Hi All,

1. I have been reading and the max size of a tuple is 8K.
I have also read that I can it to a larger size in some config file. Where is
this file? is it called pg_config.h and is the variable called BLKSZ??
You'd have to set the way back machine for a couple years ago to run into
the 8k block size limit. If someone recently told you this to steer you
away from Postgresql their knowledge is quite old, and anything they tell
you about anything since, say, the first gulf war should be viewed with
suspicion :-)

the maximum size of an idividual FIELD in a row is about 2 gigabytes.
Since text may be multi-byte, it's a good idea to call it 1 gig (of
characters) for text and you're gold.
2. Is there a way I can find the actual size of the tuple? Do you go into each
column and find the length of each value and sum it up? I am out of ideas..


Why would you need to know an idividual tuple size? There's a bit of
extra data for each field, but generally if the size of the data in the
field is 1k or more, you're not likely to notice the overhead Postgresql
is producing.

Each tuple uses about 30 some bytes, (I could be way off there, it might
be bits.) then each field uses another byte or two to keep track of
things like the size of the field etc on top of the actual data it stores.
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 22 '05 #3

P: n/a
Andrew Sullivan <aj*@crankycanuck.ca> writes:
On Tue, Feb 17, 2004 at 03:39:25PM -0700, Linh Luong wrote:
1. I have been reading and the max size of a tuple is 8K.
That hasn't been true for ages. Use a newer PostgreSQL; any modern
one will have the TOAST capability and won't have this limitation.


Actually it is still true, but with TOAST compression available for
individual columns it hardly ever matters anymore. If you have enough
columns in your table to be running afoul of the limit, you probably
oughta be thinking about a redesign of your database schema anyway.

But for the record: BLCKSZ is the thing to poke if you really must.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.