title: PHP GLOB vs MySQL search in speed?
body: <p>I have about 5,000 pictures in a folder on my site.  I need to create an array to index through on every page load, so that i can shuffle() it and switch in a slide show like manner when the user clicks the "next" button.</p>
  
  <p>Would it be faster to run glob() in PHP in the folder every time, or create a permanent MySQL table?</p>
  
  <p>And if it is faster to use MySQL, whats the best way to make the table dynamic, as I may be adding more pics to the folder over time.</p>
  
  <p>Thanks all.</p>