Discuz links php discuz theme table and reply table design

Source: Internet
Author: User
The following sections are excerpts only:
If we are to design the topic table and Reply table, the usual practice is as follows.

This allows you to extract topics directly using the paging algorithm when you get a list of topics, and you also need to jion links to topics,posts when you view a post.
The defects of this design are:
1. Topics table stores content contents, its volume will be very large, the large volume table paging, performance is very slow.
2. Join operation when displaying posts content, loss performance
The discuz approach is to design the following.

The content of the topics into the posts, while topics theme posts also as replies placed into the posts inside, this solves the above we put forward two questions. This is a typical example of violating the database design paradigm in exchange for better performance.

The above describes the Discuz link PHP discuz theme table and reply table design, including the discuz links, I hope that the PHP tutorial interested in a friend helpful.

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