Answer the question
In order to leave comments, you need to log in
PhP Text file or mysql?
Hello. Need advice from experts!
There is a task that you need to check with a php script a large amount of text keys from 500k - 3kk.
Which is better to use for fast action, plain text file or mysql.
It is necessary to constantly compare whether the key is present in an existing one or not. You will also need to sort through all the keys among themselves, for example, key 1 was taken from 3k keys, so until the key 2999k was taken from 3k.
Explained as best I could, if it's not clear, I'm sorry.
To summarize the question, what is faster to constantly pull mysql or a text file, even if it is huge, for example 1g
Answer the question
In order to leave comments, you need to log in
1 gram of a file (with one request) will not pull the muscle without foreplay, but, of course, this is an order of magnitude faster than pushing a speech from PHP
Naturally MySQL.
Here you are reading the file. A pointer is translated, written to a variable, fgets/fread heaps are called. There will be no dancing with a tambourine in MySQL. More precisely, they will, but less by an order of magnitude.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question