EF generated where clause is slower than manually created ones

Issue No: FRM-7878
Created 11/8/2018 6:14:56 PM
Type Bug-QC
Priority Blocker
Status Closed
Resolution Fixed
Fixed Version 18.3
Description This is related to IC-6385.   !pastedImage_d107852_0.png!   On the code, you can see it is the standard search grid approach.   !pastedImage_d107852_1.png!   But when you try to catch the generated code from sql profiler, you can see on the WHERE clause that it is wrapping the strPeriod field within a LOWER function. It runs very slow and causing the error above. It is actually a timeout error.   !pastedImage_d107852_2.png!   If you try to tweak the same query and use a straight-forward where clause, the data is retrieved almost immediately.   !pastedImage_d107852_3.png!   *Expected:*   Do not wrap the string fields within a {{LOWER}} or {{UPPER}} function.   The i21 standard collation for SQL string fields is {color:#000000}Latin1_Gener{color}{color:#000000}al_CI_AS{color}. Since it is case-insensitive, there is no need for the lower or upper function.