phpbar.de logo

Mailinglisten-Archive

Tipp: BENCHMARK-Funktion Re: DATE_FORMAT(timestamp, '%d') oder ... (Update)

Tipp: BENCHMARK-Funktion Re: DATE_FORMAT(timestamp, '%d') oder ... (Update)

Werner Stuerenburg mysql-de_(at)_lists.bttr.org
Thu, 18 Oct 2001 11:49:54 +0200


Hallo Berthold!

Berthold> gut, ich habs selbst getestet:

Prima!

Berthold> DAYOFMONTH(timestamp)
Berthold> 0.27 sec

Berthold> RIGHT(LEFT(timestamp,8),2)
Berthold> 0.31 sec

Berthold> DATE_FORMAT(timestamp, '%d')
Berthold> 0.48 sec

Berthold> Beispiel: timestamp = '20001122010203'

Kennst du schon

http://www.mysql.com/doc/M/i/Miscellaneous_functions.html

BENCHMARK(count,expr)

   The BENCHMARK() function executes the expression expr
   repeatedly count times. It may be used to time how fast MySQL
   processes the expression. The result value is always 0. The
   intended use is in the mysql client, which reports query
   execution times:

mysql> select BENCHMARK(1000000,encode("hello","goodbye"));
+----------------------------------------------+
| BENCHMARK(1000000,encode("hello","goodbye")) |
+----------------------------------------------+
|                                            0 |
+----------------------------------------------+
1 row in set (4.74 sec)

   The time reported is elapsed time on the client end, not CPU
   time on the server end. It may be advisable to execute
   BENCHMARK() several times, and interpret the result with
   regard to how heavily loaded the server machine is.



Herzlich
Werner Stürenburg

-- 
MySQL in Deutschland: Anpassung, Unterstützung, Schulung für Sie
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Dr.math. W. Stürenburg <werner_(at)_mysql.com>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Consultant, Trainer
/_/  /_/\_, /___/\___\_\___/   Bielefeld, Germany
       <___/   www.mysql.com   +49-5224-997-407, GSM  +49-172-938 0 238


---
!!NEU!!
Fragen und Antworten zu MySQL und dieser Liste unter
-->>  http://www.4t2.com/mysql 



php::bar PHP Wiki   -   Listenarchive