AV1611 Posted November 24, 2005 Share Posted November 24, 2005 I am doing a simple query that deletes all record with a date less than 2003-12-30... There are about 1.6 million records, and the query will expunge about 950,000 of them. The script seems to run forever, eventually, by computer says the query browser is no longer responding... Is it normal for a script like that to take over an hour? or do I have something configured wrong maybe? BTW, why doesn't this work? delete from test.labor where `DateNew` =< 1997-01-01; Quote Link to comment https://forums.phpfreaks.com/topic/2935-script-is-slowwww/ Share on other sites More sharing options...
ryanlwh Posted November 25, 2005 Share Posted November 25, 2005 950000 records. if records are deleted per microsecond, it still takes 950 seconds to complete the deletion. php scripts defaults to run for a max of 30 seconds, so the browser no longer responds. you should quote the date value, and it's <=, not =< dateNew <= '1997-01-01' Quote Link to comment https://forums.phpfreaks.com/topic/2935-script-is-slowwww/#findComment-9861 Share on other sites More sharing options...
binime Posted November 25, 2005 Share Posted November 25, 2005 also, you could try a limit function to limit the amount the script deletes and just run it several times. Quote Link to comment https://forums.phpfreaks.com/topic/2935-script-is-slowwww/#findComment-9867 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.