SQLite Forum

SQLite .NET: CommandBuilder performs really bad on tables with a lot of indexes
Login
> don't blame the schema design

Why not? If a better schema design would solve the speed problem, then it's a fair target for criticism.

> I have to live with it.

Part of that means abandoning any reasonable expectation that someone else's code will magically make your DB design perform well.

I mean, it's great if the SQLite developers find a way to make that happen, but if not, it's unreasonable to be upset that SQLite remains unoptimized for pathological use cases.

Realize however that SQLite cannot be so optimized until the developers have a reproducible test case, which you haven't provided.

> The 40 seconds are consumed in the call to SQLiteCommandBuilder.GetInsertCommand

The next step I'd take is to get [`Microsoft.Data.Sqlite`][1] out of the way: is the query just as slow from the `sqlite3` command shell?

If it's fast, then the problem's in Microsoft's .NET class, not in SQLite, so this isn't the right place to report it.

[1]: https://docs.microsoft.com/en-us/dotnet/api/microsoft.data.sqlite.sqlitecommand