ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arnaud Lemaître <arnaud.lemai...@free.fr>
Subject What about SQL_CALC_FOUND_ROWS MySQL hint ?
Date Tue, 12 Jun 2007 07:30:34 GMT
Hi,

I'm a newbie to iBatis, and i've found no information on this.

Is it possible to use this great optimization, which is available for on
MySQL InnoDB tables.

Using JDBC it must be done in one single connection : 

First statement :

"SELECT SQL_CALC_FOUND_ROWS ... FROM myTable.. WHERE ... 
LIMIT start, length"

Second one :

"SELECT FOUND_ROWS()"

Then you get the total count as if there hadn’t been a LIMIT clause.

What is the iBATIS equivalent ? should i use transaction ?

Thanks a lot,

Arnaud


Mime
View raw message