Jump to content

Scandir or MySQL, which is faster?


joosh

Recommended Posts

I'm redesigning a website with a number of organized pictures.

What method would be faster for medium amount of traffic?

How much server load is used by scandir? And multiple scandirs within while/foreach loops?

Just trying to determine which would be faster and better for the server load.

Thanks,

Josh

Link to comment
Share on other sites

Nobody here knows what medium traffic means, so you'll have to be more specific.

 

Nobody here can really tell you which is faster either, since it depends on many factors.  The size and types of hard drives and the MySQL configuration can all have big impacts on performance.  None of us know what your hardware or software configurations are.

 

Nobody here knows how many pictures you're expecting to deal with? 5 pictures?  10?  4 million?  That too makes a big difference.

 

Anyways, typically the answer to this question is the database is better.

 

That's why we invented them.

Link to comment
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.