Ask php to save the data. thank you! My younger brother has a data query website. the expected data volume is very large. I first wanted to insert it into mysql for ease of query, but the actual data volume inserted every day may exceed MB, if you use mysql to estimate the cost increase, you do not know the efficiency. So I want to save the data in the form of files. I have considered txt and xml. please ask php to save the data. thank you!
My younger brother has a data query website. the expected data volume is very large. I first wanted to insert it into mysql for ease of query, but the actual data volume inserted every day may exceed MB, if you use mysql to estimate the cost increase, you do not know the efficiency.
Therefore, I want to save data in the form of files. I have considered txt and xml, so it is a little difficult to read files. But I recently thought, can I save it as a file through serialization? (Because my data is essentially an array of data.) if all data is serialized and directly deserialized during reading, how efficient should it be?
I want to hear from experts. thank you !!
------ Solution --------------------
Should the number of queries read more than the number of writes? No need to use files in the database, IO will consume the machine's
------ Solution --------------------
Only data that is not frequently changed in the cache is meaningful. Otherwise, the overhead of checking whether the data is updated cannot be ignored.
If your data is only some array data, the most efficient is to save the var_export result to the program file.
You only need to include
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service