Presently, I'm by using this recordset paging method: (this situation continues to be cut lower with this publish)
Function getnext10(num) pageLen = len(num) if pageLen = 1 Then next10 = 10 else if pageLen > 1 Then pageRem = 10 pageTen = right(num, 1) next10 = num + pageRem - pageTen end if end if getnext10 = next10 End Function Function getPrev10(num) pageLen = Len(num) If pageLen = 1 Then prev10 = 1 ElseIf pageLen > 1 Then lastNumber = Right(num,1) prev10 = num - lastNumber End If If prev10 = 0 Then prev10 = 1 End If getPrev10 = prev10 End Function
Which utilizes a 'Do Until Loop' to obtain the correct number of results for your page.
I've been advised to decrease this process and also to begin using LIMIT paging rather. I learn how to apply this to my project, I believe, so I am not searching for anybody's code, I simply need a reason why I have to begin using it.
Aside from using less code within the LIMIT version, that will reduce my page size (mega slightly), exactly why is while using LIMIT method better? Does it improve my search query performance?
Any more clarification about this subject is going to be gratefully received.
LIMIT would enhance the perfomance of the web page. At this time you are fetching unnessesary records simply to start right record while
LIMIT would get you onto right record immediately. Allows if you have to page 100 records, 10 records per page, and user request page 10 (last page). Using the "Do Until Loop" solution you are fetching all 100 records however, you discard 90 of these immediately, without really with them. So 90% from the resultset you did not use for anything constructive! Using
LIMIT you fetch just the records you likely to use and therefore you are not wasting any assets.