How to know Table Memory used up
Vineeth.R
Posts: 121
Hi All,
I know there is a memory limitation (i think 4mb) in adding fields to a table, how can we know how much of the space is used up in a table. Is there any shortcut way other than summing up for each fields one by one.
Thanks
Vineeth
I know there is a memory limitation (i think 4mb) in adding fields to a table, how can we know how much of the space is used up in a table. Is there any shortcut way other than summing up for each fields one by one.
Thanks
Vineeth
Thanks and Regards
Vineeth.R
Vineeth.R
0
Comments
-
Normally I wait until I have a problem with a table size and then start to panic! #-o
To be honest if the tables are going above 4MB I'd start to look to see if they have been normalised properly...0 -
Vineeth.R wrote:Hi All,
I know there is a memory limitation (i think 4mb) in adding fields to a table, how can we know how much of the space is used up in a table. Is there any shortcut way other than summing up for each fields one by one.
Thanks
Vineeth
Hi
The field table limit is 4Kbyte (4000Bytes for precision...).
So a "code 20" is 20 bytes
You can use the "Field" virtual table and filter for your table.
Skip disabled fields, flowfields and flowfilters and sum the "len" field.
Bye
MatteoReno Sistemi Navision Developer0 -
Hi Matteo,
Thanks, the field table can help but for big tables its difficult to go and look for how many flowfields are there in it to skip. Any other easier way to calculate the table memory or to skip the flowfields and calculate the rest of the fields.Thanks and Regards
Vineeth.R0 -
Vineeth.R wrote:Hi Matteo,
Thanks, the field table can help but for big tables its difficult to go and look for how many flowfields are there in it to skip. Any other easier way to calculate the table memory or to skip the flowfields and calculate the rest of the fields.
Difficult??? :?Local variable "Field" of type rec and subtype Field GetTableDefinitionSize(TableID : Integer) result : Integer Field.SETRANGE(TableNo, TableID); Field.SETRANGE(Class, Field.Class::normal); Field.SETRANGE(Enabled,TRUE); IF Field.FINDSET THEN REPEAT result += Field.Len; UNTIL Field.NEXT = 0;
do you need the "table definition size" or the size of the table on database?Local variable "TableInformation" of type rec and subtype "Table Information" GetTableSize(TableID : Integer;Company : Text[30]) : Integer IF TableInformation.GET(Company, TableID) THEN EXIT(TableInformation."Size (KB)");
bye
matteoReno Sistemi Navision Developer0 -
@Matteo, your math is wrong. Its more complex than that to calculate how much pace a field uses. I have posted numerous times with the formulas.

@Vineeth, you should never reach the limit. If you even get close to it it means that you have a badly designed system that needs to be redesigned and done properly. Even if you work out the maximum and use all that up, then you are pretty much guaranteed that you wont ever be able to do an upgrade.
Re-look at the code you have written and redo it.David Singleton0 -
David Singleton wrote:@Matteo, your math is wrong. Its more complex than that to calculate how much pace a field uses. I have posted numerous times with the formulas.

@Vineeth, you should never reach the limit. If you even get close to it it means that you have a badly designed system that needs to be redesigned and done properly. Even if you work out the maximum and use all that up, then you are pretty much guaranteed that you wont ever be able to do an upgrade.
Re-look at the code you have written and redo it.
Hi david
mmm
i found this thread
viewtopic.php?f=23&t=27973&hilit=field+size
very interesting!
but... Decimal on c/side database is 12 Bytes but reading
http://msdn.microsoft.com/en-us/library/ms187746.aspx
Decimal (38,20) is 17 Bytes
Sql Server page/cluster limit si 8Kbytes (nav reduce this to 4kbyte for compatibility with C/Side database via FBK)... but the table definition size can change its size depending of database engine...
Nav assume that his masimum4kByte record will be correctly stored on SQL because the SQL Page size is 8Kbyte and then 12Bytes or 17 Bytes isn't a problem?
Thank you
MatteoReno Sistemi Navision Developer0 -
As I said it is all irrelevant anyway. The correct thing to do is to fix the errors in the design of the database, not keep working around them.David Singleton0
-
David Singleton wrote:As I said it is all irrelevant anyway. The correct thing to do is to fix the errors in the design of the database, not keep working around them.
i completly agree with you:
My last question was more "academic" than resolve the problem signaled by Vineeth (already resolved by your post).
Bye
MatteoReno Sistemi Navision Developer0 -
.Reno Sistemi Navision Developer0
-
Oh... So similar to what I said...
To be honest if the tables are going above 4MB I'd start to look to see if they have been normalised properly...0 -
AdrianAkers wrote:Oh... So similar to what I said...
To be honest if the tables are going above 4MB I'd start to look to see if they have been normalised properly...
yep :thumbsup:David Singleton0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 611 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
