QC (query cache) to the operation of the database statement cache, the next time in the same operation, will be cached force lookup, in fact, this function is only suitable for frequent and the same operation statement, so the use of the scene is still relatively small. However, if you do not specify--without-query-cache when installing, try to open it by default. However, this can have a significant impact on the performance of the statement execution. When optimizing SQL statements, it is found that:
SELECT * from phpbb_config WHERE config_name = ' num_users '; This statement is relatively slow and random to track and troubleshoot
(1) Do it first
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/88/18/wKioL1fp12XC5hGjAAAmzSiYc5k742.png "title=" 1.png " alt= "Wkiol1fp12xc5hgjaaamzsiyc5k742.png"/>
(2) Show profiles;
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/88/1C/wKiom1fp163Axhv-AADGeVrzF0A305.png "title=" 2.png " alt= "Wkiom1fp163axhv-aadgevrzf0a305.png"/>
(3) You will see the query cache comparison resource 650) this.width=650; "Src=" http://s3.51cto.com/wyfs02/M01/88/1C/ Wkiom1fp19ptjfalaadhqro5b8i514.png "title=" 3.png "alt=" Wkiom1fp19ptjfalaadhqro5b8i514.png "/>
(4) First look at the global variables inside the query cache is open decisively close
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/88/18/wKioL1fp2CmR6MO6AABEDT59clo735.png "title=" 4.png " alt= "Wkiol1fp2cmr6mo6aabedt59clo735.png"/>
(5) Close query cache
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/88/18/wKioL1fp2FSx-dv2AAAT38p6uP4065.png "title=" 5.png " alt= "Wkiol1fp2fsx-dv2aaat38p6up4065.png"/>
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/88/18/wKioL1fp2HLxCAp_AAATc87izbE802.png "title=" 6.png " alt= "Wkiol1fp2hlxcap_aaatc87izbe802.png"/>
(6) Close and look at the execution of the statement
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/88/1C/wKiom1fp2MDjllfYAACLPtlqmsQ534.png "title=" 7.png " alt= "Wkiom1fp2mdjllfyaaclptlqmsq534.png"/>
The last thing you see is a lot more refreshing.
This article is from the "Ideal for Life" blog, please be sure to keep this source http://lampol.blog.51cto.com/11662628/1856872
MySQL Performance optimizes real-world production (QC)