You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There seems to be a big performance hit in DapperAOT when using locally built string as a query.
Example:
Bad performance
string sql = "SELECT * FROM table1"
connection.Query(sql);
Good
const string sql = "SELECT * FROM table1"
connection.Query(sql);
This does not happen with Dapper.
The performance hit can be quite big for lengthy queries that are heavily repeated - like doing a transaction with 10k update queries. We noticed query being 5 times slower.
While using const string can be a solution in some case, it becomes an issue when the query need to be assembled at runtime based on different parameters (like for filters)
The text was updated successfully, but these errors were encountered:
There seems to be a big performance hit in DapperAOT when using locally built string as a query.
Example:
Bad performance
Good
This does not happen with Dapper.
The performance hit can be quite big for lengthy queries that are heavily repeated - like doing a transaction with 10k update queries. We noticed query being 5 times slower.
While using const string can be a solution in some case, it becomes an issue when the query need to be assembled at runtime based on different parameters (like for filters)
The text was updated successfully, but these errors were encountered: