DEDECMS Establish model and table operation sharing

Source: Internet
Author: User

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

2004, just built the station, I used to DEDE2.0, that time because I do not understand PHP, did not go on.

Later in the DEDE3.1 used him, feeling good, but because he and DZ mixed degree is not high, so gave up. Switched to Sup+dz mode.

Because of the passage of time, found that SUP official basically stopped SUP development, plus, SUP has its own problems, simply gave up the use of SUP, although Baidu included a good tens of thousands of pages, but also without hesitation to change the dedecms.

At present my station (http://www.yyws8.com) is my idea for a long time, has basically formed, but changed Dede after found Dede also have the problem.

This problem is not strange Dede, can only blame me, my column 3000, database will nearly 1g,25 million articles.

The section page can also endure, basically speed also can, but a generation document page is a problem, the reaction speed is extremely slow, produce HTML extremely slow, 201 group produces once to 3-5 minutes, this speed cannot live. And the most deadly is the server is always CPU explosion 100%, too depressed.

DEDECMS5.3 out after also no improvement, listen to others say Dedecms list mode is fetal trouble, very slow, the amount of data once more than 200,000, you must be divided into tables.

I started the difficult learning process. After some good people's advice, finally let me learn this method, now I have the data table storage, speed brush, hehe.

Now share with you.

First of all, to establish a model, the method of building a model lonely Tianya has written a special tutorial, but to note that the model to create a new field, the name is: the text, the English name is: Body, to select the HTML text storage mode. Fixed publishing mode. So you can see more than two 6184.html "> datasheet, one is dede_archivesxx, one is dede_addonxx, you can name yourself." Our main operation is on both tables.

  

Then start our main operation: Background system Management-System account Management-sql command run

See below the running widget, we run the SQL command here.

The main command steps are as follows:

INSERT INTO Dede_addonx select * from Dede_addonarticle where typeid=y

This dede_addonx is one of the two databases we have just built, and is a schedule.

This means that we copy all the data from one of the dede_addonarticle (the original large table) (the column number Y) to the Dede_addonx.

INSERT INTO Dede_archivesx select * from Dede_archives where typeid=y

This dede_archivesx is the main index table in the model we just built, which means the same thing as the previous sentence.

Third, UPDATE ' Dede_full_search ' SET ' channelid ' = ' X ' WHERE ' dede_full_search '. ' typeID ' =y

After copying two tables, we need to make the main index table of our Dede data more positive.

Iv. UPDATE ' dede_archivesx ' SET ' channel ' =x WHERE ' typeid ' =y

Then we make our article Model index table more positive

V. Delete from dede_addonarticle where typeid=y

Delete the previously copied data in the original table.

Sixth step, channel management, related document modification-basic settings

  

The content model selects the model that you just created, then points to the advanced settings and sets the corresponding template. Then the bottom of the Inheritance option, selected after the entire column will follow this setting CIS.

  

Finally, the success, you can look at the file inside, if you can show that you succeed.

This operation is mainly used in the article model, the other models I have not experimented, but the same, should be achieved.

For example, this is equivalent to a large reservoir into a number of small reservoirs, and then notify the water, to the small reservoir to pick up water. This is the dedecms of the table.

Feel the emperor and others who have helped me, now share these things with you, if there is any problem we can discuss. Ad one, my station, hehe, http://www.yyws8.com. I hope you have time to patronize, to make some comments. My QQ is: 1030894273, if any friend needs to be able to contact me.

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.