How to save the data PHP program, thank you

Source: Internet
Author: User
Ask PHP to save the data scheme, thank you!
Little brother has a data query site, the expected amount of data is very large, I initially want to query convenient to insert MySQL, but measured down the amount of data inserted every day may be more than 100M, if the cost of MySQL estimate increases, do not know how efficient.
So I want to save the data in the form of file, consider Txt,xml, so it is not easy to read the file slightly troublesome. But I recently thought, could it be possible to save the file in a serialized way? (Because my data is inherently part of the array data), if it's all serialized, it should be much faster to deserialize when it's read directly.
Want to listen to Master's advice, thank you!!


------Solution--------------------
Should the number of queries read more than write? Without a database file, IO would kill the machine.
------Solution--------------------
It is only meaningful to cache data that does not change frequently, otherwise it is not negligible to check whether the data is updated.
If your data is just some array data, the most efficient thing is to save the Var_export results to the program file
Only include when using

  • Related Article

    Contact Us

    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

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.