May 2017
Intermediate to advanced
442 pages
11h 55m
English
When D365O constructs the ConWHSVehicleTableServiceData data source, it automatically filters the records to the current version. The transact-SQL that does this is as follows:
SELECT T1.VEHICLEID,T1.ODOMETER,T1.VALIDTO,T1.VALIDTOTZID,T1.VALIDFROM,T1.VALIDFROMTZID,T1.RECVERSION,T1.PARTITION,T1.RECID FROM CONWHSVEHICLETABLESERVICEDATA T1 WHERE (((PARTITION=5637144576) AND (DATAAREAID=?)) AND ((VALIDFROM<=?) AND (VALIDTO>=?))) ORDER BY T1.VEHICLEID,T1.VALIDFROM OPTION(FAST 54)
This helps us understand why we made the property changes to the table. The index is clearly needed for performance, and the data source uses the properties on the table to decide on the query sent to SQL Server.
When working in code, we need to be sure ...
Read now
Unlock full access