久久机这里只有精品,国产69精品一区二区亚洲孕妇,91精品国产综合久久婷婷香蕉,午夜久久久久久电影

最新活動:電腦PC端+手機端+微網站+自適應網頁多模板選擇-建站388元起價?。?!
當前位置:主頁 > 網站建設 > MySQL 查詢緩存的實際應用代碼示例建站知識

MySQL 查詢緩存的實際應用代碼示例建站知識

時間:2023-05-24 09:05:24 閱讀: 文章分類: 網站建設 作者: 網絡小編

導讀:1建站知識以下的文章主要介紹的是MySQL 查詢緩存的實際應用代碼以及查看MySQL 查詢緩存的大小 ,碎片整理,清除緩存以及監視MySQL 查詢緩存性能的相關內容的描述建設網站高端網站建設。

建設網站高端網站建設以下的文章主要介紹的是MySQL 查詢緩存的實際應用代碼以及查看MySQL 查詢緩存的大小 ,碎片整理,清除緩存以及監視MySQL 查詢緩存性能的相關內容的描述,以下就是具體內容的描述,希望在你今后的學習中會有所幫助。   MySQL> select @@query_cache_type;   +--------------------+   | @@query_cache_type |   +--------------------+   | ON |    +--------------------+   MySQL> set query_cache_type=off;   MySQL> set query_cache_type=on;   MySQL>    MySQL> select sql_cache id, title, body from article;   MySQL> select sql_no_cache id, title, body from article;   MySQL> show variables like 'have_query_cache';   +------------------+-------+   | Variable_name | Value |   +------------------+-------+   | have_query_cache | YES |    +------------------+-------+   1 row in set (0.00 sec)     查看MySQL 查詢緩存的大小   MySQL> select @@global.query_cache_size;   +---------------------------+   | @@global.query_cache_size |   +---------------------------+   | 16777216 |    +---------------------------+   1 row in set (0.00 sec)   MySQL> select @@query_cache_size;&n建設網站bsp;  +--------------------+   | @@query_cache_size |   +--------------------+   | 16777216 |    +--------------------+   1 row in set (0.00 sec)    查看最大緩存結果,如果結果集大于該數,不緩存。   MySQL> select @@global.query_cache_limit;   +----------------------------+   | @@global.query_cache_limit |   +----------------------------+   | 1048576 |    +----------------------------+   1 row in set (0.00 sec)    碎片整理   MySQL> flush query cache   -> ;   Query OK, 0 rows affected (0.00 sec)    清除緩存   MySQL> reset query cache   -> ;   Query OK, 0 rows affected (0.00 sec   監視MySQL 查詢緩存性能:   MySQL> flush tables;   Query OK, 0 rows affected (0.04 sec)   MySQL> show status like 'qcache%';   +-------------------------+----------+   | Variable_name | Value |   +-------------------------+----------+   | Qcache_free_blocks | 1 |    | Qcache_free_memory | 16768408 |    | Qcache_hits | 6 |    | Qcache_inserts | 36 |    | Qcache_lowmem_prunes | 0 |    | Qcache_not_cached | 86 |    | Qcache_queries_in_cache | 0 |    | Qcache_total_blocks | 1 |    +-------------------------+----------+   8 rows in set (0.06 sec)     看看當前緩存中有多少條信息:   MySQL> show status like 'qcache_q%';   +-------------------------+-------+   | Variable_name | Value |   +-------------------------+-------+   | Qcache_queries_in_cache | 0 |    +-------------------------+-------+   1 row in set (0.00 sec)   MySQL> select sql_cache id, title, body from article;   MySQL> show status like 'qcache_q%';&n網站seo優化培訓bsp;  +-------------------------+-------+   | Variable_name | Value |   +-------------------------+-------+   | Qcache_queries_in_cache | 1 |    +-------------------------+-------+   1 row in set (0.00 sec)   MySQL> show status like 'qcache_f%';   +--------------------+----------+   | Variable_name | Value |   +--------------------+----------+   | Qcache_free_blocks | 1 |    | Qcache_free_memory | 16766728 |    +--------------------+----------+   2 rows iseo網站優化培訓n set (0.00 sec)     以上的相關內容就是對MySQL 查詢緩存的介紹,望你能有所收獲。相關建設網站高端網站建設。

關鍵詞標簽: SQL 緩存 示例

聲明: 本文由我的SEOUC技術文章主頁發布于:2023-05-24 ,文章MySQL 查詢緩存的實際應用代碼示例建站知識主要講述示例,緩存,SQL網站建設源碼以及服務器配置搭建相關技術文章。轉載請保留鏈接: http://www.bifwcx.com/article/web_6605.html

我的IDC 網站建設技術SEOUC.COM
專注網站建設,SEO優化,小程序設計制作搭建開發定制網站等,數千家網站定制開發案例,網站推廣技術服務。
  • 5000+合作客服
  • 8年從業經驗
  • 150+覆蓋行業
  • 最新熱門源碼技術文章

    主站蜘蛛池模板: 武隆县| 手游| 达尔| 襄樊市| 黔东| 岳普湖县| 棋牌| 北碚区| 海门市| 祥云县| 项城市| 文水县| 城市| 奉节县| 上蔡县| 辉南县| 杭锦旗| 商都县| 楚雄市| 彭泽县| 铅山县| 沿河| 玉龙| 深圳市| 伊川县| 涟源市| 苍山县| 莎车县| 沂源县| 曲松县| 阿克陶县| 青田县| 宜川县| 玉田县| 海丰县| 仪征市| 尼勒克县| 灵武市| 营山县| 清涧县| 罗江县|