Skip to content

Multiple Result reading is very slow. #854

Description

@sunilpraktan

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;
                 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions