I'm doing a page search system where I'll always do the following query in the database:
'SELECT title FROM pages ORDER BY title ASC OFFSET' +iniciaL + 'FETCH FIRST 32 ROWS ONLY'
I choose an initial OFFSET and always get the next 32. But I think this sort of order will always cost some processing. I want to know if there is already a command in postgres that will let my table pages
always be ordered and as soon as I perform this query: 'SELECT title FROM pages ASC OFFSET' +iniciaL + 'FETCH FIRST 32 ROWS ONLY'
I have 100% guarantee that the results are already sorted (if I did not give INSERT is of course).
Is this effective knowing that my insertions only happen once a day, 12:00? or do I leave anyway?
(The page table will have about 5.5 millimeters of rows)