In the past I remember running a trace on Sql Server 2008 R2 and watching the select command that got sent to the Sql Server 2008 R2 instance on my computer. It would use a statement similar to the following:
SELECT TOP 10 FROM [tablexxx]
Lately, I've been using a standard ListView control with a DataPager in the table layout and a standard SqlDataSource control as the DataSource for the ListView. I have "PageSize" set to 10 on the DataPager. I expected to see a statement similar to the one above being sent to the Sql Server as I page through the data but it always selects all the rows using the following style of select statement:
SELECT * FROM [tablexxx]
What am I doing wrong from what I was doing in the past? Isn't the whole point of using a DataPager so that you can select a small amount of rows at a time? If the DataPager submits an * in the select statement versus TOP 10(or something similar) isn't this very inefficient? On a small database it c ...
Go to the complete details ...