Monitoring Table Size Growth in SQL Server
March 31, 2011
No comment
During my vacation I came across a older, but interesting article that shows you how you can monitor table size growth in SQL-server. With a bit of creativity you can create interesting report based on this information or you can just use the examples on the second page.
Index vs Index hint
October 1, 2010
4 comments
This is a discussion I had with several colleagues. What is the difference between index and index hint and what do we use in our code?
The Ax Infolog
May 7, 2010
No comment
Wel all know the small dialog that gives the user usefull information about what is happening in Ax. In this post I will tell u some more about this.
You can add information to the Infolog by calling:
- Infolog.add(…)
info(…)
warning(…) or checkfailed(…)
error(…)- You can add some structure in it by using setPrefix(…)
- Using the Proxy-class for the Enterprise Portal
Batch job performance boost
April 22, 2010
No comment
Did you ever have trouble with the performance of your batch-job? Well maybe this small trick can shorten the time your batch runs.
The big idea: Try to split up your gigantic batch in smaller pieces. Launch a batchjob that produces many smaller batchjobs (tasks) that can handle a subset of the data you need to process. For example you can create a batch that creates a batch with sub-tasks for each company.
How do you plan a batch from code?
1 2 3 4 5 6 7 8 9 10 11 12 | BatchHeader batHeader; BatchInfo batInfo; TstRunBase rbbTask; ; rbbTask = TstMyBatch::construct(); batInfo = rbbTask.batchInfo(); batInfo.parmCaption("MyBatch"); batInfo.parmGroupId(""); batHeader = BatchHeader::construct(); batHeader.addTask(rbbTask); batHeader.save(); info(batInfo.parmCaption()); |
You can download a quick example I made. This is a job you can schedule and it will produce a new Batch job with a task for each company when you don’t select a company while shedualing (Class_TstRunBase.xpo). I hope this can help you.
Counting the number of records in a QueryRun
March 9, 2010
No comment
When you want to count the number of records that are currently displayed on a form, and you have only one data source, just call the static method countTotal() from the SysQuery-class.
public void executeQuery() { ; super(); info(int2str(SysQuery::countTotal(EmplTable_ds.queryRun()))); }
But when you want to do the same when you joined multiple data sources, you will actually have to loop trough the whole selection. You can do this easily by calling countLoops() on the SysQuery-class. Keep in mind that this has a serious influence on your performance.
public void executeQuery() { ; super(); info(int2str(SysQuery::countLoops(EmplTable_ds.queryRun()))); }







