Skip to content

Multiple Result reading is very slow. #854

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sunilpraktan opened this issue Oct 2, 2017 · 4 comments
Open

Multiple Result reading is very slow. #854

sunilpraktan opened this issue Oct 2, 2017 · 4 comments

Comments

@sunilpraktan
Copy link

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;
                 }
@mgravell
Copy link
Member

mgravell commented Oct 2, 2017 via email

@mgravell
Copy link
Member

mgravell commented Oct 2, 2017 via email

@sunilpraktan
Copy link
Author

MSSQL queries working fine and taking very less time but while reading in NextResult it is taking more time. say about 3000 rows with 100 columns. sometime it is taking more than 10 seconds which should not happen.
I will try with your first advise and let you know after trials. Thanks a Million for your support.

@NickCraver
Copy link
Member

@sunilpraktan any update here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants