Unix Technical Forum

How to calculate row sizes

This is a discussion on How to calculate row sizes within the pgsql Admins forums, part of the PostgreSQL category; --> I need some help. I need to calculate the max amount of space a row in each of my ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Admins

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 01:14 AM
Chris Hoover
 
Posts: n/a
Default How to calculate row sizes

I need some help.

I need to calculate the max amount of space a row in each of my tables will take. However, I am having a difficult time finding the information needed to do this.

Would someone please be so kind as to point me to a listing of field type sizes, and also how to calculate the space usage of the associated indexes.

thanks,

revoohc



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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 01:14 AM
Peter Eisentraut
 
Posts: n/a
Default Re: How to calculate row sizes

Chris Hoover wrote:
> Would someone please be so kind as to point me to a listing of field
> type sizes, and also how to calculate the space usage of the
> associated indexes.


FAQ 4.6

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-10-2008, 01:15 AM
Chris Hoover
 
Posts: n/a
Default Re: How to calculate row sizes

Peter Eisentraut wrote:

>Chris Hoover wrote:
>
>
>>Would someone please be so kind as to point me to a listing of field
>>type sizes, and also how to calculate the space usage of the
>>associated indexes.
>>
>>

>
>FAQ 4.6
>
>
>

This faq is not very helpful. I really need to know the values for each
type of column, and then how much to add for the overhead. It only
gives a single example, and does not address the index size. Nor does
it give the storage size for the various column types.

Anything better out there, or has anyone have a script/spreadsheet that
will calculate this?

Thanks



---------------------------(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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-10-2008, 01:15 AM
Peter Eisentraut
 
Posts: n/a
Default Re: How to calculate row sizes

Am Dienstag, 4. Januar 2005 03:10 schrieb Chris Hoover:
> This faq is not very helpful. I really need to know the values for each
> type of column, and then how much to add for the overhead. It only
> gives a single example, and does not address the index size. Nor does
> it give the storage size for the various column types.


The storage requirements for each column type are quite evidently displayed in
the documentation about the data types. The overhead is shown in the FAQ.
If you want more precise values, create a table, fill it with values, run
VACUUM FULL, and look at the file system size. That's the only way you can
be sure.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

---------------------------(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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:54 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com