You could try using SQL::Abstract::Limit. It has a way to generate queries that will only retrieve the page of results you're looking for. MSSQL would require the use of the Top dialect: (see the docs)