I have a table with 13K records and a sql machine a little old.
In the problematic page I have a netTiers datasource, that goes in timeout.
My problem is that at page_load i set the filter:
vwImmobileCommessaAttivoDataSource.Filter = "ImmobileId = '" + Request.QueryString["ImmobileId"] + "'";
that change the result number from 13K to 10.
But I see the generate query is:
BEGIN
SELECT * FROM [dbo].[vwImmobileCommessaAttivo]
ORDER BY [CommessaId]
-- get total count
SELECT @@ROWCOUNT AS TotalRowCount;
END
without the filter, and goes in timeout.
There is a way to accelerate the query? including my filter?