Multiple Result reading is very slow.
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 18.4k
- Forks
- 3.7k
- Avg merge
- 5h 8m
- Merged PRs (30d)
- 1
Description
when i use Query Multiple with Store Procedure and read results one by one then i notice that first result get read very fast but next result takes too much time to read. because of this performance we get is poor. please advise weather i am making something wrong or is there any way.
my code is as following
using (IDbConnection conn = new SqlConnection(connectionString))
{
var reader = conn.QueryMultiple("GetSalesData", new { @Request = RequestValue }, commandType: CommandType.StoredProcedure);
var UnitPriceList = reader.Read<GetItemDetailsEntity>().ToList();
MC.UnitPriceList = UnitPriceList.ToList();
var QFRList = reader.Read<GetItemDetailsEntity>().ToList();
MC.QFRList = QFRList.ToList();
var DispatchList = reader.Read<GetItemDetailsEntity>().ToList();
MC.DispatchList = DispatchList.ToList();
var ProjectedDispList = reader.Read<GetItemDetailsEntity>().ToList();
MC.ProjectedDispList = ProjectedDispList.ToList();
strReturnData = ObjectSerializationService.ObjectToXML(MC);
return strReturnData;
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the supplied QueryMultiple example and profile the GetSalesData stored procedure alongside each reader.Read() call. No repository file, test, schema, or reproducible timing is provided, so first determine whether the delay is in Dapper or the stored procedure. Done means identifying a reproducible cause and documenting or testing the resulting fix.
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