ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alin Popa <alin.p...@gmail.com>
Subject iBatis - MySQL pagination
Date Fri, 15 May 2009 16:10:15 GMT
Hi,

I'm using iBatis with MySQL and also trying to do some pagination:


return getSqlMapClientTemplate().queryForList("getAll", skipResults,
maxRecords);

and the "getAll" query:

<select id="getAllVJobs" resultMap="simpleResult">
		SELECT * FROM mytable
</select>

Indeed, the pagination seems to work fine, BUT in mysql logs I see
executed the entire "SELECT * FROM mytable" which is a full table
scan.
Doesn't seems very right to me.

Is there a catch behind this idea ?
Is fetching all records and after that iterate through them ? (I don't
think it's very nice this way).

Any ideas ?

Thanks.
Alin

Mime
View raw message