1. Background:
In discuz! In the X2, the original 1 attachment tables and an attachment description table were combined and then divided into 11 tables, which greatly enhanced the support of the forum for the amount of attachment data, while alleviating the problem of high server load due to the large number of attachment records.
At the same time, add a theme picture table, if a theme of the landlord affixed with a picture attachment, the attachment will be the largest width of the diagram will be written to this table.
2. The Annex table explains:
Pre_forum_attachment
|
Attachment Index Table |
Pre_forum_attachment_0 |
Annex Sub-table 0 |
Pre_forum_attachment_1 |
Annex Sub-Table 1 |
... |
... |
pre_forum_attachment_7 |
Annex Sub-table 7 |
Pre_forum_attachment_8 |
Annex Sub-Table 8 |
Pre_forum_attachment_9 |
Annex Sub-Table 9 |
Pre_forum_attachment_unused |
List of unused attachments |
Pre_forum_threadimage |
Theme Picture Table |
which
The Pre_forum_attachment table is present as an index to save the attachment ID and the real attachment information data. The data stored in the table has
Attachment ID, subject ID, post ID, table ID, number of downloads
The pre_forum_attachment_{1-9} table acts as a real data table for attachments, where the data includes all the information from the original attachment table, along with the data from the original attachment table, such as the attachment description. Here is the last one of the subject's TID to decide which sub-table the attachment should be kept in.
The pre_forum_attachment_unused table is saved when the post is posted, but there is no real attachment to the successful posting.
Pre_forum_threadimage table saved is, a theme in the landlord paste picture attachment, the width of the largest picture. The function of this picture is that the DIY module calls the Post module to select the image attachment, the image displayed is directly from the table query. At the same time, the recorded pictures in this table are also available as theme covers for the picture pattern.
discuz! X2 of annex table and theme picture Table analysis