Closed GoogleCodeExporter closed 9 years ago
Enclosed is a patch.
Original comment by raupach....@googlemail.com
on 16 Sep 2010 at 5:36
Attachments:
This feature would be really useful.
Original comment by joao...@gmail.com
on 17 Sep 2010 at 10:58
This should be already covered funcionally by RowBounds.
Maybe for a performance improvement MyBatis could have a new config property to
enable using setMaxRows when RowBounds was passed as a parameter. In this case
setMaxRows should be set to RowBounds#getOffset()+RowBounds#getLimit().
thoughts?
Original comment by eduardo.macarron
on 30 Jul 2011 at 4:34
Guess you are right. RowBounds is fine.
Original comment by raupach....@googlemail.com
on 31 Jul 2011 at 5:53
I am not sure about this change.
I cannot find any information about de difference between setting maxRows and
stopping reading from RecordSet. Seems that network traffic and database
resource consumption will be almost the same. Besides, setMaxRows may work
wrong on poor drivers.
Please add more info to argue the inclusion or setMaxRows.
Original comment by eduardo.macarron
on 12 Sep 2011 at 6:33
Original comment by eduardo.macarron
on 8 Nov 2011 at 7:39
I'm not sure if it's the same thing. We have tables with more than 100 million
records. I know it may sound stupid to paginate these registers, but it's not
my call. I am afraid that the database performance can degrade without LIMIT.
We are using MariaDB (mysql fork) and the driver calls set @@SQL_SELECT_LIMIT =
value for setMaxRows(). According with documentation, this is the same as the
LIMIT:
"""
SQL_SELECT_LIMIT acts as an automatic LIMIT row_count to any SELECT query.
SET @@SQL_SELECT_LIMIT=1000
SELECT * from big_table;
The above is the same as:
SELECT * from big_table LIMIT 1000;
"""
https://mariadb.com/kb/en/mariadb/documentation/optimization-and-tuning/query-op
timizations/how-to-limittimeout-queries/
Original comment by nat...@gmail.com
on 21 Sep 2014 at 2:27
Original issue reported on code.google.com by
raupach....@googlemail.com
on 14 Jul 2010 at 4:21