Getting the Internal size of the records message

This has been briefly discussed before but for the newcomers to the AX world if you are getting this error: "The total, internal size of the records in your joined SELECT statement is [x] bytes, but Microsoft Dynamics is by default performance-tuned not to exceed 49152 bytes" it means one thing:

you have a sql statement that has too many joins / too many columns in the tables you are trying to retrieve, and as a result the amount of bytes needed to accommodate one row with the maximum size for each of the columns will exceed the value you have setup as the current buffer size.

The MSDN topic here https://technet.microsoft.com/en-us/library/aa569634.aspx explains it as well.

So, when you get this error you have two options:
a) increase the size of the buffer; you do this in the Microsoft Dynamics AX 2012 Server Configuration utility, in the Database tuning tab;
b) review your sql statement and maybe try to better design it.

Why not always take approach a) vs b). Of course, a better design of the data structure is the way to go, and always try to strive for that, but maybe that is not possible sometime. Throughout the years it was said that increasing the buffer size too much (going over let's say 100k) is going to produce issues with AOS stability, but so far I haven't seen issues with values hovering around that.

No comments:

Post a Comment