473,388 Members | 1,423 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

finding out actual tuple size

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
3 3216
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Carlo v. Dango | last post by:
Hello there. I have a function which as an argument takes a tuple and either returns that tuple or a mutated version of it. The problem is that tuples are imutable, hence I have to create a new...
1
by: Jinming Xu | last post by:
Hello everyone, While embedding my C++ program with Python, I am impeded by the conversion from a Python Tuple to a C++ array. I hope to get some assistance from you guys. I have a sequence...
29
by: George Sakkis | last post by:
Why does slicing a tuple returns a new tuple instead of a view of the existing one, given that tuples are immutable ? I ended up writing a custom ImmutableSequence class that does this, but I...
8
by: Tor Inge Rislaa | last post by:
Finding the width of a text I need to find the width of a text. When the user change the font in a textbox I want the textbox to fit the text automatically by changing txtMyTextBox.Width...
43
by: Tim Chase | last post by:
Just as a pedantic exercise to try and understand Python a bit better, I decided to try to make a generator or class that would allow me to unpack an arbitrary number of calculatible values. In...
77
by: Nick Maclaren | last post by:
Why doesn't the tuple type have an index method? It seems such a bizarre restriction that there must be some reason for it. Yes, I know it's a fairly rare requirement. Regards, Nick...
2
by: fabian.conrad | last post by:
Hi, sorry for the rather basic question but I've searched everywhere and don't find an answer. I want to call PyObject_CallObject from the Python C-API and pass a tuple I've created from a...
7
by: Breal | last post by:
I have a list that looks like the following I would like to be able to determine which of these overlap each other. So, in this case, tuple 1 overlaps with tuples 2 and 3. Tuple 2 overlaps...
275
by: Astley Le Jasper | last post by:
Sorry for the numpty question ... How do you find the reference name of an object? So if i have this bob = modulename.objectname() how do i find that the name is 'bob'
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.