Hi!
>>>>> "Minjie" == Minjie Qiu <[EMAIL PROTECTED]> writes: Minjie> Hello, Minjie> I'm working on a purge utility to purge 3 tables: call_record, Minjie> modem_call_rec and makrup. Those 3 tables are related with foreign key Minjie> recid, so I used the following sql to purge data that is older than 30 days: Minjie> delete call_record, modem_call_rec, markup from call_record, Minjie> modem_call_rec, markup where to_days(now())-to_days(call_record.setup)>=30, Minjie> and call_record.recid=modem_call_rec.recid and call_record.recid=markup.recid; Minjie> The result is, it works well with limited number of records. But when the Minjie> number of records increases, for example to 500 records per table, Minjie> call_record table is purged correctly, but the other two tables Minjie> (modem_call_rec and markup) are not purged at all. Minjie> The mysql manual mentioned that delete may not work when deleting tables Minjie> with correlated columns. Is that the reason why the above query does not work? No, this should not be the case here. I don't see any reason for why the above should not work. Can you produce a test case for this so that we can look into it? If yes, send it to ftp:://support.mysql.com/pub/mysql/secret and we will try to fix this. <cut> Regards, Monty -- For technical support contracts, goto https://order.mysql.com/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Mr. Michael Widenius <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, CTO /_/ /_/\_, /___/\___\_\___/ Helsinki, Finland <___/ www.mysql.com --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php