Edit2: I'm running MS SQL 2012 express
I'm trying to speed up this query used to fill a planboard inside my application. For that i'm using objects and Dates to create a sort of matrix. For each combo of objects and dates (the latter based on the provided parameters from the client app) i'm searching plandcards (tbl_planning) along with their attributes (projects and Bestellingen [=orders]).
The slow part is in 1) the Bestellingen (PurchaseOrders and Lines) probably due to the OR conditions based on the date. 2) the XML that combines the attributes in one string (which contains HTML, and must be unencoded for use in the clientapplication).
Do you guys have any idea how to increase performance of this beast?
Many thanks. Ron
Update 1: code snippet for 1): Executed for each Object/Date/tbl_planning combination.
By RvRijbroek 1 asked Sep 10, 2017 at 11:27 AM