Objectdatasource updating input parameters
At first glance it may seem like such an approach would be no better than just returning all of the records.After all, we're still working with all of the records in table's data in its entirety, the stored procedure only returns 10 records (or however many records per page are configured).This requires a complete table scan on the data to be paged through.Instead, we can create the table variable to hold only the primary key column(s) of the table to be paged through.Therefore, let's augment the stored procedure to take in the integer input parameters clause.Improving the Stored Procedure's Performance Daniel's approach is costly in part because it dumps all of the columns from the table to be paged through into the temp table.A previous article on 4Guys, Paging through Records using a Stored Procedure by Daniel Anderson, provides one approach that far outperforms the default paging implementation.However, it has a few areas that can be updated to improve the performance.
table INSERT INTO @Temp Items (Employee ID) SELECT Employee ID FROM Employees -- Now, return the set of paged records SELECT e.*, d.[Name] as Department Name FROM @Temp Items t INNER JOIN Employees e ON e. In short, don't use the stored procedure discussed in this article, but rather check out Greg's advice in A More Efficient Method for Paging Through Large Result Sets.
Additionally, I did not simulate any load that multiple, concurrent visitors to a website would incur.
The results follow and are also avaiable at the end of this article as an Excel spreadsheet.
In short, don't use the stored procedure discussed in this article, but rather check out Greg's advice in A More Efficient Method for Paging Through Large Result Sets.
Introduction When displaying large amounts of data to a user, it's important that the information be presented in digestible chunks rather than slamming it all down their throats at once.