Hello all,
I need to find a solution for to have better performance on a method.
As you can see in the picture i have a method who is call on a MVC Controller.
This method will be call too much in more or less one hour.
This method FindEvents, take a list of string as parameters and if you look the code i see 2 problems of it
-
- the select *
- the where clause query are build with for each statement
Here is it what i can do for to have better performance:
- -> select * can be replace by annymous type for to avoid to get the > 60 column of the table and just take the field we need
- -> for the foreach loop, I wonder if it's better to build a foreach for to have this resutl in ('AAA,' 'BBB', 'CCC' )
Or
To send the long string like this 'AAA, BBB,CCC' make a splt in sql function and execute the query
Also do you think it will be better to used with EF store procedure ?
Any comment, way to have better performance will be apprecied ..
thanks for all