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
https://forums.phpfreaks.com/topic/169019-scandir-or-mysql-which-is-faster/
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.

Archived

This topic is now archived and is closed to further replies.

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