Experience in promoting database performance

xiaoxiao2021-03-06  119

I am doing a search engine for business information, I get some experience in the process. as follows:

1. Establish a summary Table 2. For those digital forms and frequent queries must establish an index, I don't remember where to see a post: "Don't use the garbage index". Depressed N long. This post is available. . Hey. Recommendation: The use of small size in WHERE is generally indexed. Stored in a separate table of sizes and stored in a separate table of the LIKE query. 3. Do not select * ..., first select id .... then get the ID, and remove the ID to an array in the current page. . Perform select * from xxx where id in (Implode (',', $ ID); if the obtained data is to be join, please do this in this SELECT statement. Because the database is subsequent, the selection factor will be small a lot of.

4. Separate data to be retrieved in full text and the current data. The form of the second paradigm in the database design is represented. Information corresponding to the data primary key in a separate table.

5. Add a primary, int (smallint, tinyint to see how many data to see).

6. After doing your system, use Explain Select .... Analyze the statement of the system. See how mysql handles this statement.

7. Subtimately store information (can also be distributed on different database servers)

转载请注明原文地址:https://www.9cbs.com/read-97978.html

New Post(0)