Size of the table record

Get our Free Newletter

Don't you have the time to be online here at DUG every day? So how do you follow what is going on in the Dynamics industry and community?
If you subscribe to the DUG Newsletter then you can relax! We will make sure that you don't miss the big news!

Check out our
Newsletter Subscription Center
page a complete list of our different newsletters.

Not Answered This post has 0 verified solutions | 10 Replies | 3 Followers

Male
189 Posts
2,765 Points
Joined: 2010-8-4
Last Online:
2012-11-30 9:31
Location: Chennai , India
Karthik.D posted on 2012-9-14 6:58

Hi all,

 I want to know the size of a tables record. Is there any possibility in navision to find out the size. I know, that we can find out the size of the table from database information form. But I want to calculate the size after applying filter on the table.

 

Regards,

Karthik.D

All Replies

Male
6,597 Posts
65,173 Points
Joined: 2001-4-12
Last Online:
2013-5-3 10:20
Location: Prague, Czech Republic
DynamicsNAVMVP
SystemAdministrator
David Singleton replied on 2012-9-14 10:07

Why would the record size change when you apply a filter?

David Singleton - MVP Dynamics NAV Dynamics NAV Consultant since 1991 Available for Navision system performance design and tuning.
Dynamics Book

Male
189 Posts
2,765 Points
Joined: 2010-8-4
Last Online:
2012-11-30 9:31
Location: Chennai , India
Karthik.D replied on 2012-9-14 11:59

Dear David,

   I am not sure what I am asking is correct or not. Please correct me if I am wrong. Consider I am having 10 records in a table whose size is 200kb and applied filter in that table and I am having only 5 records for which the size should be approximately 100kb. Please let me know my understanding is correct or not.?

 

Regards,

Karthik.D

Male
2,193 Posts
32,545 Points
Joined: 2006-4-10
Last Online:
2013-5-19 4:41
Location: Pune India
Moderator
Amol replied on 2012-9-14 12:12

I don't think so applying filter will change size of the table.

-Amol

http://dynamicsuser.net/blogs/amol

Don't forget to  the post(s) that solved your problem

Male
6,597 Posts
65,173 Points
Joined: 2001-4-12
Last Online:
2013-5-3 10:20
Location: Prague, Czech Republic
DynamicsNAVMVP
SystemAdministrator
David Singleton replied on 2012-9-14 15:50

Karthik.D:
Please let me know my understanding is correct or not.?

Not sure about yours, but understanding is zero now. I really don't have a clue what you are asking.

David Singleton - MVP Dynamics NAV Dynamics NAV Consultant since 1991 Available for Navision system performance design and tuning.
Dynamics Book

Male
81 Posts
1,165 Points
Joined: 2011-12-1
Last Online:
2013-2-25 20:20
Location: Hillsboro, USA
JSP replied on 2012-9-14 19:03

Hi, what is the purpose of knowing this information?

Male
31 Posts
330 Points
Joined: 2012-9-16
Last Online:
2013-5-11 9:51
Location: Denmark
Palle Arentoft replied on 2012-9-16 17:28

Hello there

Setting a filter on a table does not change the Record-size. The Records-ize is a matter of the Sum-of-lengths-of-all-fields in a records. For example

 

1 - Code - Code 10
2 - Description - Text 50

Then the recordsize would be 10+1 + 50 + 1 (the two x 1 are Carriage Returns) = 62 bytes.

Depending of the version of your Dynamics NAV you will have a recordsize of either 2K or 4K.

Your questions and reason for asking is not clear - could you perhaps explain a litte bit further why you need this information ?

Best Regards

Palle Arentoft,
Dynamics NAV Specialist

www.NAVspecialist.dk

 


Best Regards

Palle Arentoft,
Dynamics NAV Specialist

www.NAVspecialist.dk

- One have to fully understand the question in order to give the right answer. So always try to be as precise as possible when asking for help!


Male
31 Posts
330 Points
Joined: 2012-9-16
Last Online:
2013-5-11 9:51
Location: Denmark
Palle Arentoft replied on 2012-9-16 19:43

Hello

If you have a table with two fields like

 

FIeld 1 - Code - Code 10

FIeld 2 - Description - Text 50

Then you would have a recordsize of 62 bytes (10 + 50 + 2x1 Carriage Returns).

This size if fixed and does not change regardless of 10 records or a million, nor does it change when you add a filter !

What makes you assume that the recordsize changes?

 

 

 


Best Regards

Palle Arentoft,
Dynamics NAV Specialist

www.NAVspecialist.dk

- One have to fully understand the question in order to give the right answer. So always try to be as precise as possible when asking for help!


Male
6,597 Posts
65,173 Points
Joined: 2001-4-12
Last Online:
2013-5-3 10:20
Location: Prague, Czech Republic
DynamicsNAVMVP
SystemAdministrator
David Singleton replied on 2012-9-16 20:33

Palle Arentoft:
Then you would have a recordsize of 62 bytes

Close but it's 64 actually. Wink

David Singleton - MVP Dynamics NAV Dynamics NAV Consultant since 1991 Available for Navision system performance design and tuning.
Dynamics Book

Male
31 Posts
330 Points
Joined: 2012-9-16
Last Online:
2013-5-11 9:51
Location: Denmark
Palle Arentoft replied on 2012-9-16 20:43

Ohh is it CRLF ???


Best Regards

Palle Arentoft,
Dynamics NAV Specialist

www.NAVspecialist.dk

- One have to fully understand the question in order to give the right answer. So always try to be as precise as possible when asking for help!


Male
6,597 Posts
65,173 Points
Joined: 2001-4-12
Last Online:
2013-5-3 10:20
Location: Prague, Czech Republic
DynamicsNAVMVP
SystemAdministrator
David Singleton replied on 2012-9-16 23:09

Code is Length + 1 byte for length info + 1 byte for alignment then rounded up to the nearest long word. So 10 + 1 + 1 = 12 = 3 long words

Text is Length + 1 byte for length info the round to nearest long word so 50 + 1 = 51 nearest long word = 52.

Boolean is worst, needing 4 bytes to store 1 bit.

Most people forget the long word rounding.

Also I wonder if the alignment byte is still needed since we don't have native anymore. Maybe that is used to store the VarChar/Integer info in SQL.

By the way this is also why Text and code are limited to 250 in length.

David Singleton - MVP Dynamics NAV Dynamics NAV Consultant since 1991 Available for Navision system performance design and tuning.
Dynamics Book

Page 1 of 1 (11 items) | Get this RSS feed | Bookmark and Share