title: Efficient way to save the images in mysql database
body: <p>I have got a MySQL / PHP code that:</p>
  
  <ol>
  <li>encodes the uploaded image</li>
  <li>saves it in database</li>
  <li>fetches encoded base64 images from database, 10 at a time</li>
  <li>saves in file system, and</li>
  <li>puts the paths of the image in same database table</li>
  </ol>
  
  <p>I tried with 200 images and it takes around 5 mins to do the task, but trying with 2000 images takes hours.</p>
  
  <p>I generally don't think this is professional way of saving the images in database. How should I approach this to improve the efficiency.</p>