Jump to content

Archived

This topic is now archived and is closed to further replies.

AV1611

Script is slowwww.

Recommended Posts

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;

Share this post


Link to post
Share on other sites

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' 

Share this post


Link to post
Share on other sites

also, you could try a limit function to limit the amount the script deletes and just run it several times.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.