The document says it evaluates the 'expr', so I'm guessing it is only
function calls and arithmetic evaluation. Although I have tried selects
without any luck. It could probably be documented a little more clearly,
or event better yet...a supported feature.

Ed

-----Original Message-----
From: Raimundo Sierra [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 14, 2005 9:37 PM
To: mysql@lists.mysql.com
Subject: Benchmark()

It is not clear to me what benchmark really does. Example:

SELECT SQL_NO_CACHE * FROM mytable where myVarcharRow like 'sometext%' 
or otherVarcharRow like 'someothertext';

takes approx. 0.3 seconds. If you benchmark this query, which to my 
understanding should run and not just parse the query, it is faster??

SELECT BENCHMARK(10000000, "SELECT SQL_NO_CACHE * FROM mytable where 
myVarcharRow like 'sometext %' or otherVarcharRow like 'othertext %'");

returns 1 row in set (0.12 sec)

Another similar example is:

SELECT * FROM Table;
returns: 59770 rows in set (0.23 sec)
SELECT BENCHMARK(100000, "SELECT * FROM Table");
returns: 1 row in set (0.01 sec)

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to