We are writing some code to control the pagination of results returned from a Tridion Broker database query (using the API).
We are using SDL Tridion 2011 SP1 and can use the PagingFilter to get the tcmIds of just the Components on the selected page.
However, whilst writing out the pagination control we need to know the total number of results (to determine how many pages there will be). Is there a more efficient mechanism for doing this than just running a separate query for 'all' results and doing a .Length on the string array returned? (Obviously you would only run this query once and persist that value as the user clicks between pages.)
If we are getting all of the results then why would I bother using the PagingFilter when we can just process the information returned in the 'all' query?
Many thanks in advance, Jonathan
NOTE: There will probably be a maximum of 2000 results of any one type returned.