Wednesday, June 15, 2011

Tips & Tricks - Number Sequence


When you are using a Number Sequence, keep in mind that a Continuous Number Sequence is slower than a non-continuous. The reason is that the system creates a record in the table NumberSequenceList (with the status Active) and cleans it up later during TTSCOMMIT.
Performance tip: You can improve the performance of a process that creates many numbers of one Number Sequence by using number pre-allocation. This loads a set of numbers into the memory and provides faster access. You can do this by using the NumberSeqGlobal, witch means that once it is instantiated, it is available until the session is closed. This function is only available for non-continuous Number Sequences. The numbers can only be retrieved from the cache by calling the getNumInternal() method in the NumberSeq_Fast class.

No comments:

Post a Comment

Thanks for your time reviewing this blog.