I have a query that I’m running in EF Core hooked up to a SQLite DB. I noticed it was running a bit slower than I expected so I turned on the logs to output the query. In the logs, it says:
Executed DbCommand (2,883ms)
However, when I run the query in DB Browser for SQLite, it only takes 100ms. What could account for this difference?
Some details:
- The query returns 14K rows, with 5 columns that are all GUIDs. So I don’t think it’s a data transfer issue
- The query is part of a set of 5 queries that are run using AsSplitQuery (using AsSingleQuery it’s only 370ms total)
- I’ve tried with and without AsNoTracking()
I can try to provide more details on the query if needed but I need to avoid posting proprietary info as much as possible.
I’ve tried running the query in a separate tool and I expected the timings to be the same!