Just a few rows

  • Comments posted to this topic are about the item Just a few rows

  • 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”

  • 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"?

  • 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.

  • 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

  • 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.

  • 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