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

On 5/28/21, mybati...@googlegroups.com <mybati...@googlegroups.com> wrote:
> =============================================================================
> Today's topic summary
> =============================================================================
>
> Group: mybati...@googlegroups.com
> Url:
>
> https://groups.google.com/forum/?utm_source=digest&utm_medium=email#!forum/mybatis-user/topics
>
>
> - Can I limit the size of the returned ResultSet without RowBounds [1
> Update]
> http://groups.google.com/group/mybatis-user/t/cbed63ba4e798b62
>
>
> =============================================================================
> Topic: Can I limit the size of the returned ResultSet without RowBounds
> Url: http://groups.google.com/group/mybatis-user/t/cbed63ba4e798b62
> =============================================================================
>
> ---------- 1 of 1 ----------
> From: Erwan Letessier <erwan.l...@gmail.com>
> Date: May 28 09:24AM +0200
> Url: http://groups.google.com/group/mybatis-user/msg/8013f10dd3ea
>
> Set value for either "fetchSize" property in select statement or
> "defaultFetchSize" in global config.
> Value is null by default, then driver dependent. E.g: Only 10 with Oracle
> and unlimited with Postgres.
>
>
>
>
>
>
>
>
> --
> You received this digest because you're subscribed to updates for this
> group. You can change your settings on the group membership page:
>
> https://groups.google.com/forum/?utm_source=digest&utm_medium=email#!forum/mybatis-user/join
> .
> To unsubscribe from this group and stop receiving emails from it send an
> email to mybatis-user...@googlegroups.com.
>
>
Reply all
Reply to author
Forward
0 new messages