Answer the question
In order to leave comments, you need to log in
Which is faster: file_get_contents to json file or query to db?
As far as I understand, it depends on how heavily the json
file is filled, but then again, MB, who knows the articles are sensible or will they write it themselves?
What should be the weight of json
the file to be more efficient than a database query? Can I have some specific numbers?
PS
I ask this, since there are conditional sockets for chats, in the same place it is unlikely that every message is immediately recorded in the database (or is it done?).
Answer the question
In order to leave comments, you need to log in
the question is completely stupid. both in content and purpose.
speed - in the vast majority of cases, it is not a criterion at all.
The criterion is ease of use.
I point with my fingers:
ten times faster. sounds cool, right?
and if we take it not relatively, but absolutely: how much faster is 0.001 seconds in the context of the web than 0.01 seconds?
you won't notice this difference at all until you have millions of hits at least an hour.
and if you are so restless to get an answer, then take measurements. because the measurements of others have nothing to do with your conditions.
there are conditional sockets for chats, in the same place it is unlikely that every message is directly in the database immediately
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question