Unix Technical Forum

Reg: Records Size

This is a discussion on Reg: Records Size within the pgsql Admins forums, part of the PostgreSQL category; --> please...tell me if there is possibility of finding out the size of a record in the specified table. Is ...


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, 06:28 AM
sandhya
 
Posts: n/a
Default Reg: Records Size



please...tell me if there is possibility of finding out the size of a record in the specified table.
Is there any built in function to know the size of each record by passing a query?
I need this Inorder to allocate the memory after retrieving the records.
Pls suggest me.

Thanks&Regards,
Sandhya

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 06:28 AM
John Barham
 
Posts: n/a
Default Re: Reg: Records Size

On 11/11/05, sandhya <sandhyar@amiindia.co.in> wrote:
> please...tell me if there is possibility of finding out the size of a
> record in the specified table.
> Is there any built in function to know the size of each record by passing a
> query?
> I need this Inorder to allocate the memory after retrieving the records.
> Pls suggest me.


You are not giving enough information. What programming language are
you using? What do you mean by a "record"? Do you want to know much
memory to allocate to store each tuple resulting from a query? If so,
that will obviously depend on the type of each column and the size of
each field.

John Barham

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-10-2008, 06:28 AM
sandhya
 
Posts: n/a
Default Re: Reg: Records Size

Hi John ,
Thank you.
I am using C.
Yes i mean to allocate memory of each tuple resulting from a query.
Is there any function which gives the size of a tuple?
If so...Please tell me/Tell me how to proceed to do that?

Thanks&Regards,
Sandhya R




----- Original Message -----
From: "John Barham" <jbarham@gmail.com>
To: "sandhya" <sandhyar@amiindia.co.in>
Cc: "postgre" <pgsql-admin@postgresql.org>; "Sivakumar K"
<sivakumark@aztec.soft.net>
Sent: Friday, November 11, 2005 2:40 PM
Subject: Re: [ADMIN] Reg: Records Size


On 11/11/05, sandhya <sandhyar@amiindia.co.in> wrote:
> please...tell me if there is possibility of finding out the size of a
> record in the specified table.
> Is there any built in function to know the size of each record by passing

a
> query?
> I need this Inorder to allocate the memory after retrieving the records.
> Pls suggest me.


You are not giving enough information. What programming language are
you using? What do you mean by a "record"? Do you want to know much
memory to allocate to store each tuple resulting from a query? If so,
that will obviously depend on the type of each column and the size of
each field.

John Barham


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-10-2008, 06:28 AM
John Barham
 
Posts: n/a
Default Re: Reg: Records Size

> I am using C.

Lucky you. I use Python.

> Yes i mean to allocate memory of each tuple resulting from a query.
> Is there any function which gives the size of a tuple?
> If so...Please tell me/Tell me how to proceed to do that?


From the manual:
http://www.postgresql.org/docs/8.0/i...EC-SELECT-INFO
will give you everything you need.

John

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

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 PM.


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