Home Using database vs file for static data
Reply: 0

Using database vs file for static data

user563 Published in April 20, 2018, 5:59 pm

I have a box in the rightbar of my website named "top users per week". So, for a week, the content of that box will not change. So I can store that data in two ways:

  1. Using a table database (and update it weekly by an event)
  2. Using a file and update it weekly with a cron jobs

Now I want to know, which one is better and has a smaller cost? I mean executing a select query is more optimal or opening a text file on the server using file_get_contents() and explode() it ?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.559374 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO