Has anyone had issues with the SQL Turbo built in stored procedures having slow performance?
We are trying to page the top 2000 results. Here is the general query I am passing into the server:
declare @sql varchar(5000)
select @sql = '
SELECT top 2000 pl.id
FROM dbo.business (nolock)
JOIN dbo.listings l (nolock) on l.businessid = business.businessid
JOIN dbo.nearby n WITH (Nolock) on l.ZIPID = n.NearbyZIPID
AND (n.zipid = 16814) '
exec tdbExecuteReturnPageL @sql, 3, 20
The tables are business, listing (locations of a a business), and nearby (a list of local zipcodes). We have horrible response times when the number of users increases. Also, the results per page vary - sometimes we get all 20 for the page, other times, only 5 records are returned!
Is there any issue with the statement or how we are going about this?