For advice on creating a mysql table, the query involves more than 10 fields: one table, multi-table join, or view creation.

Source: Internet
Author: User
I have a topic table that contains information such as the content Title Author, along with a topic_extra containing the number of replies, likes, satisfactory replies, and updates. There are 14 fields in total. After the split, there will be only six or seven fields in each table. I think the table can be small and small. The conflict is that the query needs to be combined, plus the user... I have a topic table that contains information such as the content Title Author, along with a topic_extra containing the number of replies, likes, satisfactory replies, and updates. There are 14 fields in total. After the split, there will be only six or seven fields in each table. I think the table can be small and small.

The conflict is that the user table and Other permission control tables need to be joined during the query, but most of the data is written in topic_extra. I was wondering if I could solve this problem through the view, or what do you usually do? Why?

Reply content:

I have a topic table that contains information such as the content Title Author, along with a topic_extra containing the number of replies, likes, satisfactory replies, and updates. There are 14 fields in total. After the split, there will be only six or seven fields in each table. I think the table can be small and small.

The conflict is that the user table and Other permission control tables need to be joined during the query, but most of the data is written in topic_extra. I was wondering if I could solve this problem through the view, or what do you usually do? Why?

4. There are a lot of join Operations in tables. If a join operation is not performed, the data to be extracted is different because of different requirements. You can use the ID to associate the extra field to retrieve data, combined with cache, the hit rate and high performance will also be OK

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.