Показать сообщение отдельно
Старый 19.05.2023, 13:58   #475  
Владимир Максимов is offline
Владимир Максимов
Участник
КОРУС Консалтинг
 
1,651 / 1158 (42) ++++++++
Регистрация: 13.01.2004
Записей в блоге: 3
Цитата:
Сообщение от fed Посмотреть сообщение
Нет под рукой DAX2012, поэтому хочу спросить - там что - реально forceliterals стоял в коде ? (Просто я наверное и не вспомню на вскидку, где в стандарте forceliterals прописан был в DAX2012...)
Там напрямую строка запроса формируется и выполняется "как есть"

X++:
AccountingEventSourceDocumentProcessor::executeSQL(sqlStatementText);
Т.е. приведенный UPDATE - это значение переменной sqlStatementText, которая там сформирована.

Еще и комментарий написан

X++:
    // Do the update as direct SQL as there is a deadlock on AccountingDistribution due to a clustered
    // index scan operator in the query plan. This operator appears only in low data volume scenarios.
    // In higher volume scenarios, the plan includes a seek operator using the index I_7452SOURCEDOCUMENTHEADERIDX.
    // Testing in SSMS indicates an index hint will correct the plan at low volumes and represents minimal
    // risk at high volumes. In order to enable the index hint on the update_recordset, direct SQL must be used.
    // Also note that xGlobal::randomPositiveInt32() is the method used by the kernel to populate the
    // recversion field.
__________________
- Может, я как-то неправильно живу?!
- Отчего же? Правильно. Только зря...