Hello Mark, Thanks for your short response. I have checked it again. I have restarted MySQL first. When I executed command
select SQL_CALC_FOUND_ROWS BF_USER.LOGIN_NAME, BF_USER.EMAIL, BF_USER.ID, BF_USER.MODIFICATION_DATE, BF_USER.SUPER_USER, BF_USER.GUEST_ACCESS_ENABLED, FOUND_ROWS() AS FR from BF_USER use index (LST_BF_USER_LOGIN_NAME) where BF_USER.DOMAIN_ID=19 and BF_USER.ID NOT IN(280) order by BF_USER.LOGIN_NAME asc limit 0, 20 from squirel, the FOUND_ROWS() column has value = -6510615555426900571. It means, there is not defined FOUND_ROWS() value in that moment, so I think there is no way to do it :( Thank you very much again, with best regards, Julian Legeny Thursday, November 25, 2004, 4:31:37 PM, you wrote: MM> Julian, MM> Squirrel SQL also uses JDBC, so my guess is you're doing something MM> different in your program compared to entering it via the client. MM> FOUND_ROWS() is scoped by _connection_, are you sure you don't do MM> anything with the connection between issuing the two queries (for MM> example, calling commit(), or using the connection via a pool, and not MM> having the same connection twice in a row?) MM> -Mark >> Hello Brent, >> >> Thanks for your answer, I have try to use clause SQL_CALC_FOUND_ROWS >> within my SELECT query (and I also didn't use SELECT COUNT(*) ... query). >> But when I used SQL_CALC_FOUND_ROWS and then I retrieved number of >> all columns using SELECT FOUND_ROWS(), the performance was worse than >> before (with SELECT COUNT(*) + SELECT ... LIMIT query). >> >> I have try to use also following construction (used FOUND_ROWS() as >> the output from the query): >> >> select SQL_CALC_FOUND_ROWS >> BF_USER.LOGIN_NAME, >> BF_USER.EMAIL,BF_USER.ID, >> BF_USER.MODIFICATION_DATE, >> BF_USER.SUPER_USER, >> BF_USER.GUEST_ACCESS_ENABLED, >> FOUND_ROWS() >> from BF_USER use index (LST_BF_USER_LOGIN_NAME) >> where BF_USER.DOMAIN_ID=19 and >> BF_USER.ID NOT IN(280) >> order by BF_USER.LOGIN_NAME asc >> limit 0, 20 >> >> But when I executed this command from JAVA, I have retrieved from >> the column FOUND_ROWS() value = 1 ... but there were 1000 items within >> the particular table and value has to be also 1000. >> But when I executed the same command from a DB client, I have >> retrieved from the column FOUND_ROWS() value = 1000. >> It means, the same command returns me different values for >> FOUND_ROWS() and it is conditioned by executing this command from JAVA >> or from DB client (I have used SQuireL SQL Client). -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]