title: My issue related with execution time and database functionality
body: <p>I have a big issue makes me in bad mood.</p>
  
  <p>My issue related with execution time and database functionality.</p>
  
  <p>When i retrieve a 4000 users from db, And for each users make some functions as update his data, delete or add new data in anther table which related with this user, This process take long time more than 10 mins, And sometimes the script page is down before its ending.</p>
  
  <p>Some people suggest to optimize the queries, I think this the minimal queries i can request to do what i want for my proper cause.</p>
  
  <p>Else people suggest to use memcached technique, But i wonder is this technique is useful for my issue, Most of queries must make change in database as update, insert or delete. In addition this script is run by cronjobs.</p>
  
  <hr>
  
  <h2>Note: I use mysql db extension.</h2>
  
  <p>Is there any solutions for this issue ?? As using mysqli or PDO ?? Is that make any maintaining difference ? Or anything else ?</p>
  
  <p>Something else please, If you have any recommendation about execution time and db functionality, Please comment it.</p>
  
  <p>Thank you for attention.</p>