Jump to content

Script is slowwww.


AV1611

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;

Link to comment
https://forums.phpfreaks.com/topic/2935-script-is-slowwww/
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' 

Link to comment
https://forums.phpfreaks.com/topic/2935-script-is-slowwww/#findComment-9861
Share on other sites

Archived

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

×
×
  • Create New...

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.