Welcome to WebmasterWorld Guest from 22.214.171.124
Forum Moderators: open
If the data doesn't change often, you might consider to dump the result of the query in a temporary table and give each record in that table a unique sequence number starting at 1. With a PRIMARY index on that sequence number, you can jump directly to the wanted records with the WHERE clause in a SELECT statement.
For example for page 101, you can request the records with ID number 3001..3030 from your temporary table which will be equally fast as requesting the records 1..30 for page 1.
That sounds like what I want to do exactly. I kind of thought that would be the way to go, however I am not sure on how to implement it. The table will never change without me changing it. So I could make it so that after I update the table I update the temporary table. I haven't really ever dealt with Temporary tables (as I have never needed to in a couple years of web developing). Can you give me a basic example of how to do this in pseudo code? I basically would like to see how to make the temporary table and how to update the table without disabling the query when I make changes to it.