Re: Digest for mybatis-user@googlegroups.com - 1 update in 1 topic
5 views
Skip to first unread message
Vladimir Alarcon
unread,
May 31, 2021, 8:56:51 PM5/31/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mybati...@googlegroups.com
I would consider adding "LIMIT n" or "FETCH FIRST n ROWS ONLY" to your
SQL statement, depending on the database dialect. I assume that this
extra request falls outside the CRUD universe.
Even though RowBounds can do the job, I would not recommend it since
the engine may be materializing the entire result set before sending
it to the client. This can result in unnecessary effort on the engine
side.
Whichever strategy do you use to limit the result set, make sure your
are using ORDER BY, or that you have a very good reason not to use it.