I am using the following statement to fetch the results of query in dataset.
DataSet ds = new DataSet()
ds = OdbcHelper.ExecuteDataset(Connection.ODBCConnection(), CommandType.StoredProcedure, "{ CALL Search_EQ_SP(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}", p)
I have two stored procedures Search_EQ_SP and Search_NF_SP.Both return nearly 90000 records.Both take less than 25 seconds to execute when checked in sql server.But when it comes to fetching data in dataset in c# Search_NF_SP takes 30-35 secs which is considerable but Search_EQ_SP takes 3 mins and above.
I have also tried using datareader instead of dataset but still getting the same results.
I still cant figure out if Search_EQ_SP is taking secs in sql server to execute then why it is taking so long to load data in dataset. Any ideas?Any suggestions?
Experts..Please help me.I am stuck.
Thanks in advance.