Problems with the PHP chat room Information Store

Source: Internet
Author: User
I am using PHP to make an instant chat room, want to store the content of the chat in a TXT file, the client each request content first to determine whether the TXT file size has changed, there is a change in the description of the new information, and then the PHP processing to return the new information to the client.
Does this compare with the storage in the database will be compared to the consumption of performance, or find the content is relatively slow? How big is the impact?
I would like to store the content in a file to delete the chat when the chat is over. Excuse me, what is the better plan?


Reply to discussion (solution)

In fact, the data exist in the database, there will not be too much consumption.

In fact, the data exist in the database, there will not be too much consumption.
。。。 Yes, I'm asking if there's a file that's going to cost a lot more than the existence of a database.

If you are considering performance issues
Then the professionals will do better than the average person.
Or there's no CEO business.

If you are considering performance issues
Then the professionals will do better than the average person.
Or there's no CEO business.
I may not say very clearly, my current needs are:
(1) Fast to find new chat content
(2) After the chat to delete the chat content, or do not need to save chat content.
Would this be a good place to save the chat to a file or to a database?
This is just a PHP problem, not the CEO to answer the question it ...

You don't understand a metaphor?

Without a test, I don't have a say. If the data is very small, direct txt faster if it's a little bit more, there's no database.

You don't understand a metaphor?
Soga ...

Without a test, I don't have a say. If the data is very small, direct txt faster if it's a little bit more, there's no database.
Haha, this speech is very helpful, but also want to know more detailed comparison.
For example, there are a number of different topics in the chat room, it is good to build multiple tables or multiple TXT files. In addition, you still have to delete the table or TXT file after the chat is over. Is this a good way to build a table or a TXT file?

can use Memcache, the instant information does not need to deposit the database.

  • 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.