RE: how to write query to return records has the closest date to end of month

2004-07-06 Thread michael . lee
Hi Lam, Try and see whether following SQL work for you: create temporary table tmp as select product_id, min(abs(to_days('2004-6-30') - to_days(snapshot_date)) + if(snapshot_date '2004-6-30',0,0.1)) as date_diff from product_tbl group by product_id; select product_tbl.* from product_tbl,

mysqladmin flush-logs

2004-07-05 Thread michael . lee
Hi, I would like to use logrotate to manage the log files generated by MySQL. I used the command mysqladmin flush-logs to close the log file. However, the sql command displayed on the query log is Refresh. According to the information from this forum, command flush logs should be used instead

File name of Binary Log

2004-07-02 Thread michael . lee
Hi, I have enabled the binary log on MySQL (4.0.20). The name of the binary log is hostname-bin.001, hostname-bin.002, etc ... What will happen if the suffix become 999? Will error occurs when flush logs is executed? Regards, Michael

INNODB transaction log size

2004-06-28 Thread Michael Lee
Hi, I would like to migrate my DB from Sybase ASE to MySQL INNODB table. Data has been extracted and stored as a file. I want to use the command Load Data Infile to insert the data to MySQL. However, some table contains millions of rows. Can i control the batch size of the loading (e.g.

RE: INNODB transaction log size

2004-06-28 Thread Michael Lee
` number of inserts. -Original Message- From: Michael Lee To: [EMAIL PROTECTED] Sent: 6/28/04 1:21 AM Subject: INNODB transaction log size Hi, I would like to migrate my DB from Sybase ASE to MySQL INNODB table. Data has been extracted and stored as a file. I want to use the command Load

Select problem for column with Binary attribute

2004-06-26 Thread Michael Lee
Hi, I am using MySQL 4.0.20. For a table of INNODB type, same query return different results when different query plan is used. select * from project_team where project_id = 'FMS '; -- 2 rows. (primary key used) select * from project_team ignore index (PRIMARY) where project_id = 'FMS ';