DapperLib / DapperLib/Dapper

Dapper use sql + parameter efficient

Open
#2,085 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
18.4k
Forks
3.7k
Avg merge
5h 8m
Merged PRs (30d)
1

Description

why is the performance using DynamicParameters in the SQL IN clause more than 3 times slower than actually using a composed sql query?

may i ask which parts can optimize the performance of parameters, or declare the type of parameters?

Ex : select * from table where column IN :test.

var list = new List(){"1","2"}
var parameters = new DynamicParameters();
parameters.Add(":test",list);
var table_datas = connection.Query(sql, parameters);

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the SQL IN query with DynamicParameters and compare it with the composed SQL query shown in the issue. Inspect the parameter handling around connection.Query and determine whether the difference is provider-specific; done should include a measured explanation or a clearly scoped optimization backed by results.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, sql
Domain
backend, database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.