Skip to content

Dapper doesn't use prepared statements #474

@buybackoff

Description

@buybackoff

In most RDBMS that could be replaced by stored procedures, but SQLite doesn't have them. If I need to insert many rows, but cannot do so in a single transaction, I cannot reuse prepared statements. Please see this issue for additional details. In this test using Dapper is now c.25% slower than the manual call.

One idea is to cache queries by sql string, make them prepared, and just populate parameters on every subsequent call. That could be done with some additional overload with an optional parameter prepared = false. Are you interested in supporting this?

Dapper is awesome for automatic mapping, it will be even more awesome and faster with support of prepared statements!

Metadata

Metadata

Assignees

No one assigned

    Labels

    v3.0Changes awaiting the next breaking release

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions