S
Silva
Hi
I'm wondering which solution is better to limit result: to set limit
directly in sql statement or in Fill method (of SqlDataAdapter)
1. Example ilustrating sql limiting:
....
// sql statement for select command: Select * From Customers Order by name
myDataAdapter.Fill( customers, 0, 10, "Customers");
...
2. Example ilustrating rather adonet limiting:
....
// sql statement for select command of dataAdapter: Select Top 10 * From
Customers Order by name
myDataAdapter.Fill( customers, "Customers");
....
Which is better for performance ???
Is the first solution worse?
Is sqlserver retrivig only 10 rows in the second solution??? or is selecting
all the appropriate rows but only 10 fills the restul set ???
Thanks
I'm wondering which solution is better to limit result: to set limit
directly in sql statement or in Fill method (of SqlDataAdapter)
1. Example ilustrating sql limiting:
....
// sql statement for select command: Select * From Customers Order by name
myDataAdapter.Fill( customers, 0, 10, "Customers");
...
2. Example ilustrating rather adonet limiting:
....
// sql statement for select command of dataAdapter: Select Top 10 * From
Customers Order by name
myDataAdapter.Fill( customers, "Customers");
....
Which is better for performance ???
Is the first solution worse?
Is sqlserver retrivig only 10 rows in the second solution??? or is selecting
all the appropriate rows but only 10 fills the restul set ???
Thanks