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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 02.06.2015, 19:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,643 / 848 (80) +++++++
Регистрация: 28.10.2006
goshoom: Index for delete actions
Источник: http://dev.goshoom.net/en/2015/06/in...elete-actions/
==============

When using delete actions in Dynamics AX, don’t forget that AX will have to look into database to know if there is any related record. And if there is no index, the performance can be really bad.

I’ve just run into such a case, when deleting a customer executed a query running for six seconds. SQL tracing in AX showed me the following query and call stack:

SELECT T1.RECID FROM SOME_CUSTOM_TABLE T1WHERE (((PARTITION=?) AND (DATAAREAID=?)) AND (CUSTACCOUNT=?))






(C)\Classes\xRecord\doValidateDelete(C)\Classes\xRecord\validateDelete(C)\Data Dictionary\Tables\CustTable\Methods\validateDelete - line 8(C)\Classes\FormDataSource\validateDelete(C)\Classes\FormDataSource\delete(C)\Forms\CustTable\Data Sources\CustTable\Methods\delete - line 8Although CustTable has overridden validateDelete(), the code at line 8 is just a call of super(). Therefore it’s all handled by AX kernel and the obvious explanation is a delete action. As expected, there was a delete action from CustTable, a relation on AccountNum and no corresponding index on the custom table.

Every time you create a delete action, think about how AX will look for the record and whether an index isn’t needed.



Источник: http://dev.goshoom.net/en/2015/06/in...elete-actions/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
goshoom: Connection to external database Blog bot DAX Blogs 0 16.03.2015 18:11
goshoom: Locking in Team Foundation Version Control Blog bot DAX Blogs 0 15.10.2014 22:11
goshoom: Index fragmentation on xRef tables Blog bot DAX Blogs 2 01.07.2014 11:58
doens.be: Index vs Index hint Blog bot DAX Blogs 0 28.01.2011 23:14
Rajdip's space: The mystery of "index" vs. "index hint" Blog bot DAX Blogs 0 20.04.2010 20:05

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

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

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