MySQL Databases and Files

So, I will work on a home blog in PHP, and I was wondering which data storage method is the fastest. I could go in the direction of MySQL, or I could go with my own little way to do this, which stores all the information (encoded in JSON) in files.

What will be the fastest, MySQL or JSON file?

+2
source share
8 answers

I would choose a MySQL database - simply because it is easier to manage.

JSON , JavaScripts. , XML PHP (, , , , JSON).

0

" " , , - , MySQL SQL Server, .

+4

DB ( , ). , .

MySQL, , .
, .

, DB, - SQL (SQLite SQLite.org). SQL, . , .

+2

, , , , ?

10 000 , , .

MySQL , ? - , , , sqlite.

+1

, , - .

CouchDB, , ( ). , ( "-" ).

...

+1

, , MySQL , , .

, MySQL PHP , , ezSQL. ezSQL , , , JSON .

0

. .

:

1) , , . , .

2) , . ( , ) , , . , "animal.txt" /animal.txt. . , . , , .

. , .

0
source

It's really cool. This is a PHP class that manages a flat database with queries http://www.fsql.org/index.php

For blogs, I recommend caching pages because blogs usually only have static content. This way, queries are run only once during caching. You can refresh cached pages when you add a new blog post.

0
source

Source: https://habr.com/ru/post/1752205/


All Articles