AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 03.05.2011, 06:15   #1  
Blog bot is offline
Blog bot
Участник
 
25,643 / 848 (80) +++++++
Регистрация: 28.10.2006
axinthefield: How Preallocated Number Sequences are Cached in AX
Источник: http://blogs.msdn.com/b/axinthefield...hed-in-ax.aspx
==============

Number sequences handle automatic allocation of voucher numbers, invoice numbers, and journal numbers used by Microsoft Dynamics AX. You can set the allocation to be Continuous or Preallocate a block of numbers. When using Continuous, gaps are not allowed so a trip to the database is needed to get the next number. When preallocating, a block of numbers are stored in memory thus reducing the number of trips. This is important for the overall performance of the system. However, it is important to understand how these numbers are cached in a multi-user system.

Number sequences are stored on the client and not shared among user sessions. Thus, each client/user session draws its own set of numbers. If the client/user session logs out then a new set of numbers are pulled but if they stayed logged in they will continue to use the first set of numbers that was allocated to that client/user session. For example:
  1. Sales orders are set to preallocate by 10 and the next number is SO-00010
  2. User A launches a client session and attempts to create Sales orders
  3. The system preallocates 10 numbers in memory (SO-00010-SO-00019)
  4. User A creates three Sales orders and the system creates them as SO-00010, SO-00011, SO-00012
  5. User B launches a client session and attempts to create Sales orders
  6. The system preallocates 10 numbers in memory (SO-00020-SO-00029)
  7. User B creates one Sales order and the system creates this as SO-00020
  8. User A creates another Sales order and the system creates as SO-00013
  9. User A logs out of its client session
  10. User A launches a new client session and attempts to create Sales orders
  11. The system preallocates 10 numbers in memory (SO-00030-SO-00039)
  12. User A creates one Sales order and the sytem creates it as SO-00030
In most cases, using preallocated number sequences is good practice as less trips to the database but if the risk of using too many number sequences is not a good trade off for increased performance then you should reconsider.




Источник: http://blogs.msdn.com/b/axinthefield...hed-in-ax.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
axinthefield: Video: How to collect a trace within Dynamics AX Blog bot DAX Blogs 0 16.04.2011 02:19
dax-lessons: Number sequences on the form [NumberSeqFormHandler] in Dynamics AX [X++] Blog bot DAX Blogs 0 28.03.2011 01:11
axinthefield: Dynamics AX Event IDs Blog bot DAX Blogs 0 01.03.2011 22:11
daxdilip: Whats New in Dynamics AX 2012 (A brief extract from the recently held Tech Conf.) Blog bot DAX Blogs 7 31.01.2011 12:35
axStart: Microsoft Dynamics AX 2009 Hot Topics Web Seminar Series Blog bot DAX Blogs 0 06.08.2008 12:05

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 00:31.