Before submitting the bug, please correct one terminology:
"udf" -> "Stored function"
You have "stored routines"
http://dev.mysql.com/doc/refman/5.1/en/stored-routines.html
A udf is something else:
http://dev.mysql.com/doc/refman/5.1/en/adding-udf.html
I got a consistent time with:
mysql> SELECT @@version;
+------------------+
| @@version |
+------------------+
| 5.1.30-community |
+------------------+
mysql> SHOW VARIABLES LIKE '%buffer_size';
+-------------------------+----------+
| Variable_name | Value |
+-------------------------+----------+
| bulk_insert_buffer_size | 8388608 |
| innodb_log_buffer_size | 2097152 |
| join_buffer_size | 131072 |
| key_buffer_size | 57671680 |
| myisam_sort_buffer_size | 71303168 |
| preload_buffer_size | 32768 |
| read_buffer_size | 65536 |
| read_rnd_buffer_size | 262144 |
| sort_buffer_size | 262144 |
+-------------------------+----------+
mysql> SHOW TABLE STATUS LIKE 'records'\G
*************************** 1. row ******
Name: records
Engine: MyISAM
Version: 10
Row_format: Fixed
Rows: 626
Avg_row_length: 17
Data_length: 10642
Max_data_length: 4785074604081151
Index_length: 50176
Data_free: 0
Auto_increment: 3911876
I don't know if any of those VARIABLES are relevant; what do you have?
On an unrelated topic; these are quite redundant:
KEY `ix_unpaidhours` (`UserID`),
KEY `ix_userid` (`UserID`),
KEY `idx_xhours` (`UserID`),
KEY `idx_recordalerts` (`UserID`),
KEY `idx_usertimeclass` (`UserID`)
I got consistent times for running it.
Edited 1 time(s). Last edit at 02/01/2011 12:39AM by Rick James.