Re: fulltext search speed issue with SQL_CALC_FOUND_ROWS

2003-12-15 Thread tk
Hello, Could one not store the total while using the index and use select FOUND_ROWS() without SQL_CALC_FOUND_ROWS to retrieve the total? Yes, it could. It is the optimization that wasn't implemented yet. (but it's in the TODO) Once again, thanks for the response. Could you give an

Re: fulltext search speed issue with SQL_CALC_FOUND_ROWS

2003-12-05 Thread Sergei Golubchik
Hi! On Dec 04, tk wrote: Hello, Thanks for the response. There is one thing that is not clear however. Regardless of whether or not I perform the fulltext search with or without the SQL_CALC_FOUND_ROWS keyword, the results that I get are exactly the same. Also, the notion of

RE: fulltext search speed issue with SQL_CALC_FOUND_ROWS

2003-12-05 Thread Boehn, Gunnar von
Hi TK, There was an optimizer bug in MySQL 4.0 This bug is fixed in 4.0.17 (not yet released) # Fixed bug when the optimiser did not # take SQL_CALC_FOUND_ROWS into account # if LIMIT clause was present. (Bug #1274) Kind regards Gunnar -Original Message- From: [EMAIL PROTECTED]

Re: fulltext search speed issue with SQL_CALC_FOUND_ROWS

2003-12-05 Thread tk
Hello Sergei, Gunnar, and others, thank you for your quick responses. One little mystery remains: Why does one need to read all the row data (with SQL_CALC_FOUND_ROWS) to get the total number of results when using a limit? When the index is used to find relevant rows and sort the results, the

Re: fulltext search speed issue with SQL_CALC_FOUND_ROWS

2003-12-05 Thread Sergei Golubchik
Hi! On Dec 05, tk wrote: Hello Sergei, Gunnar, and others, thank you for your quick responses. One little mystery remains: Why does one need to read all the row data (with SQL_CALC_FOUND_ROWS) to get the total number of results when using a limit? When the index is used to find

Re: fulltext search speed issue with SQL_CALC_FOUND_ROWS

2003-12-04 Thread Matt W
Hi, Yes, you would have similar results with any query that uses SQL_CALC_FOUND_ROWS. That's because MySQL has to see how many rows would be found without the LIMIT. So in your case, it can't just abort the query after it finds 10 rows. All rows that match the WHERE need to be found. You might

Re: fulltext search speed issue with SQL_CALC_FOUND_ROWS

2003-12-04 Thread tk
Hello, Thanks for the response. There is one thing that is not clear however. Regardless of whether or not I perform the fulltext search with or without the SQL_CALC_FOUND_ROWS keyword, the results that I get are exactly the same. Also, the notion of stopping after the limit is reached