RE: SQL_CALC_FOUND_ROWS using ODBC driver

2007-02-19 Thread Bonnett, John
: SQL_CALC_FOUND_ROWS using ODBC driver Hi, I've used PHP with MySQL and I was able to count the rows of a table by using the following code: SELECT SQL_CALC_FOUND_ROWS * FROM MyTableName; SELECT FOUND_ROWS(); However, I would like to do the same thing using Visual Basic 6... When I set the RS.Source t

Re: SQL_CALC_FOUND_ROWS using ODBC driver

2007-02-16 Thread Nuno Vaz Oliveira
Nils Meyer wrote: SELECT SQL_CALC_FOUND_ROWS doesn't make much sense without a where clause by the way. LIMIT, not where. Thanks for the reply... That seems to make sense. I'm talking about the part of one record being returned containing a field with the number of records.

Re: SQL_CALC_FOUND_ROWS using ODBC driver

2007-02-15 Thread Jess Balint
On Thu, Feb 15, 2007 at 01:04:26AM +, Nuno Oliveira wrote: > Hi, > > I've used PHP with MySQL and I was able to count the rows of a table by > using the following code: > > SELECT SQL_CALC_FOUND_ROWS * FROM MyTableName; > SELECT FOUND_ROWS(); > > However, I

Re: SQL_CALC_FOUND_ROWS using ODBC driver

2007-02-15 Thread Nils Meyer
Nils Meyer wrote: > SELECT SQL_CALC_FOUND_ROWS doesn't make much sense without a where clause by the way. LIMIT, not where. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: SQL_CALC_FOUND_ROWS using ODBC driver

2007-02-15 Thread Nils Meyer
ECT FOUND_ROWS() returns exactly one record *CONTAINING* the number of found rows. So you have to access the resultset to get the actual number of rows. SELECT SQL_CALC_FOUND_ROWS doesn't make much sense without a where clause by the way. regards Nils -- MySQL General Mailing List

SQL_CALC_FOUND_ROWS using ODBC driver

2007-02-14 Thread Nuno Oliveira
Hi, I've used PHP with MySQL and I was able to count the rows of a table by using the following code: SELECT SQL_CALC_FOUND_ROWS * FROM MyTableName; SELECT FOUND_ROWS(); However, I would like to do the same thing using Visual Basic 6... When I set the RS.Source to the first SELECT stat

Re: SQL_CALC_FOUND_ROWS

2005-11-21 Thread Gleb Paharenko
Hello. > data, if may grow, I like the cleanness of the SQL_CALC_FOUND_ROWS, > however, currently, it is only saving me code, not performance. Often it is ok to have more complex code to get better performance. You should decide what is important for you - clearness of the code, or

SQL_CALC_FOUND_ROWS

2005-11-20 Thread Scott Haneda
4.0.18-standard-log Having some performance issues, and I can not see why: SELECT SQL_CALC_FOUND_ROWS l.id, u.b_first_name FROM logbook AS l LEFT JOIN users AS u ON l.user_id = u.id ORDER BY id DESC LIMIT 0, 20; 20 rows in set (1.21 sec) If I take out the SQL_CALC_FOUND_ROWS, of course, it is

Re: [PHP] RE: Problem with SELECT SQL_CALC_FOUND_ROWS

2005-02-02 Thread Richard Lynch
Matt Babineau wrote: > Ok I installed PHP 4.3.10 and it still has not fixed the problem. If I > remove the SQL_CALC_FOUND_ROWS from the query, it works no problems! This > is > very strange behavior! Not really that strange, I think... While you might want to read this: http:/

Re: Problem with SELECT SQL_CALC_FOUND_ROWS

2005-02-02 Thread Jigal van Hemert
9:20 PM Subject: Problem with SELECT SQL_CALC_FOUND_ROWS > Hi All- > > I'm running a query that uses SQL_CALC_FOUND_ROWS for my search engine on a > real estate site. The problem is that I get an error when I run my query: > > "Warning mysql_query(): Unable to sav

RE: Problem with SELECT SQL_CALC_FOUND_ROWS

2005-02-01 Thread Matt Babineau
: Michael Stassen [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 01, 2005 3:55 PM To: Michael Dykman Cc: Matt Babineau; 'MySQL General' Subject: Re: Problem with SELECT SQL_CALC_FOUND_ROWS I'm confused. That bug was closed over 2 years ago. What makes you think it applies here, and

Re: Problem with SELECT SQL_CALC_FOUND_ROWS

2005-02-01 Thread Michael Stassen
e what happens? Matt Babineau Criticalcode w: http://www.criticalcode.com p: 858.733.0160 e: [EMAIL PROTECTED] -Original Message- From: Michael Dykman [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 01, 2005 12:47 PM To: Matt Babineau Cc: 'MySQL General' Subject: Re: Problem with SE

RE: Problem with SELECT SQL_CALC_FOUND_ROWS

2005-02-01 Thread Michael Dykman
al Message- > From: Michael Dykman [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 01, 2005 12:47 PM > To: Matt Babineau > Cc: 'MySQL General' > Subject: Re: Problem with SELECT SQL_CALC_FOUND_ROWS > > Matt, > > I suspect your problem is PHP, not My

RE: Problem with SELECT SQL_CALC_FOUND_ROWS

2005-02-01 Thread Matt Babineau
Ok I installed PHP 4.3.10 and it still has not fixed the problem. If I remove the SQL_CALC_FOUND_ROWS from the query, it works no problems! This is very strange behavior! Matt Babineau Criticalcode w: http://www.criticalcode.com p: 858.733.0160 e: [EMAIL PROTECTED] -Original Message

RE: Problem with SELECT SQL_CALC_FOUND_ROWS

2005-02-01 Thread Matt Babineau
:47 PM To: Matt Babineau Cc: 'MySQL General' Subject: Re: Problem with SELECT SQL_CALC_FOUND_ROWS Matt, I suspect your problem is PHP, not MySQL. refer to http://bugs.php.net/bug.php?id=16906&edit=1 On Tue, 2005-02-01 at 15:20, Matt Babineau wrote: > Hi All- > &

Re: Problem with SELECT SQL_CALC_FOUND_ROWS

2005-02-01 Thread Michael Dykman
Matt, I suspect your problem is PHP, not MySQL. refer to http://bugs.php.net/bug.php?id=16906&edit=1 On Tue, 2005-02-01 at 15:20, Matt Babineau wrote: > Hi All- > > I'm running a query that uses SQL_CALC_FOUND_ROWS for my search engine on a > real estate site.

RE: Problem with SELECT SQL_CALC_FOUND_ROWS

2005-02-01 Thread Matt Babineau
Ok here is the code chunk: $rows = is_numeric($_GET['rows']) ? $_GET['rows'] : 5; $stRow = 0; // SEARCH CODE $sql = "SELECT SQL_CALC_FOUND_ROWS propertyData.*, propertyDataBulk.propertyDesc FROM propertyData LEFT JOIN propertyDa

Re: Problem with SELECT SQL_CALC_FOUND_ROWS

2005-02-01 Thread SGreen
"Matt Babineau" <[EMAIL PROTECTED]> wrote on 02/01/2005 03:20:49 PM: > Hi All- > > I'm running a query that uses SQL_CALC_FOUND_ROWS for my search engine on a > real estate site. The problem is that I get an error when I run my query: > > "Warning

Problem with SELECT SQL_CALC_FOUND_ROWS

2005-02-01 Thread Matt Babineau
Hi All- I'm running a query that uses SQL_CALC_FOUND_ROWS for my search engine on a real estate site. The problem is that I get an error when I run my query: "Warning mysql_query(): Unable to save result set in /clients/search.php" My Query is: SELECT SQL_CALC_FOUND_RO

problems with SQL_CALC_FOUND_ROWS [repost]

2004-04-26 Thread Arthur Radulescu
Hello! I am facing a problem when using SQL_CALC_FOUND_ROWS in certain queries. The query where I am ordering by a column is much more slowly than the same query NOT using SQL_CALC_FOUND_ROWS select SQL_CALC_FOUND_ROWS * from table by date desc - this query takes about 1.2 s select * from

problems with SQL_CALC_FOUND_ROWS

2004-04-22 Thread Arthur Radulescu
Hello! I am facing a problem when using SQL_CALC_FOUND_ROWS in certain queries. The query where I am ordering by a column is much more slowly than the same query NOT using SQL_CALC_FOUND_ROWS select SQL_CALC_FOUND_ROWS * from table by date desc - this query takes about 1.2 s select * from

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 t

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? >

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 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 PRO

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 t

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

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.

fulltext search speed issue with SQL_CALC_FOUND_ROWS

2003-12-04 Thread wassuuuub
('some_search_term') LIMIT 0,10 However, when i add the SQL_CALC_FOUND_ROWS keyword like in the following query, some queries take longer than 1 minute: SELECT SQL_CALC_FOUND_ROWS something FROM some_table WHERE MATCH (some_column) AGAINST ('some_search_term') LIMIT 0,10 How can there be

Re: SQL_BUFFER_RESULT and SQL_CALC_FOUND_ROWS in same SELECT broken

2002-03-05 Thread Sinisa Milivojevic
[EMAIL PROTECTED] writes: > >Description: > *** against BK as of set 1.1144 *** > > It appears that putting SQL_BUFFER_RESULT and SQL_CALC_FOUND_ROWS > in the same SELECT statement is a really bad idea! > > SELECT FOUND_ROWS() after

SQL_BUFFER_RESULT and SQL_CALC_FOUND_ROWS in same SELECT broken

2002-03-03 Thread mattj
>Description: *** against BK as of set 1.1144 *** It appears that putting SQL_BUFFER_RESULT and SQL_CALC_FOUND_ROWS in the same SELECT statement is a really bad idea! SELECT FOUND_ROWS() after SELECT SQL_BUFFER_RESULT SQL_CALC_FOUND_ROWS either return