October 11, 2019 at 12:00 am
Comments posted to this topic are about the item Just a few rows
October 11, 2019 at 5:18 am
Nice question to end the week on, thanks Steve
____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
October 27, 2019 at 7:15 pm
Thanks I had forgotten about this command.
For pagination is it better to use limit and offset or a condition in the where clause. I would normally go for the where clause instead of this but would using limit and offset be better. Ir is the answer "it depends"?
October 28, 2019 at 2:28 pm
It really depends, but the OFFSET runs the full query and then trims out the results. You might be better with a WHERE clause with good indexing.
October 29, 2019 at 11:53 pm
Hello Steve
Thanks for confirming and explaining the key differences.
I will stick with the where clause in that case as do have an index covering the field/s in question and performance seems ok.
Thanks again.
Robin
October 30, 2019 at 4:16 pm
That's likely working well. If you do some testing, especially with larger offsets, you might get some confidence that this works better or not.
October 30, 2019 at 4:17 pm
Wear the tux
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply