Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.