Discuz! Board

 找回密碼
 立即註冊
搜索
熱搜: 活動 交友 discuz
查看: 1|回復: 0

This purpose after installing

[複製鏈接]

1

主題

1

帖子

5

積分

新手上路

Rank: 1

積分
5
發表於 13:56:06 | 顯示全部樓層 |閱讀模式
We will do it by calling the built in WordPress function get_num_queries . For WordPress via the Ac min panel we log in to the FTP server go to the directory of our default Twenty Twenty One theme and in the file footer.php at the very bottom before the body tag add p Number of queries to the MariaDB database php echo get_num_queries p By calling the above code when entering our WordPress website the result of the number of SQL queries that WordPress has performed will appear at the bottom.

The first time the result will not take into account Redis caching because according to what we said earlier the data must first go from the database to Redis and only on subsequent calls will the pages be read Phone Number List from it. When we first enter the page we get a result of SQL queries. So we refresh the page and the result is only ! So Redis reduced the number of database queries from to or by almost %! And we're talking about WordPress with virtually no content that has just been installed.



Number of SQL tasks in WordPress Website | n For the purposes of our tests let's take a closer look at an extensive store based on WooCommerce. We do not change the way we test the number of database queries. Here we also insert at the end of the footer.php file of the used theme a reference to the built in WordPress function get_num_queries . To load our store more with queries we also install sample data for WooCommerce. Time for a test. The first launch of the store gives us the result of SQL queries. Refreshing the page reads data from Redis.

回復

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 立即註冊

本版積分規則

Archiver|手機版|自動贊助|z

GMT+8, 04:24 , Processed in 0.035329 second(s), 18 queries .

抗攻擊 by GameHost X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回復 返回頂部 返回列表
一粒米 | 中興米 | 論壇美工 | 設計 抗ddos | 天堂私服 | ddos | ddos | 防ddos | 防禦ddos | 防ddos主機 | 天堂美工 | 設計 防ddos主機 | 抗ddos主機 | 抗ddos | 抗ddos主機 | 抗攻擊論壇 | 天堂自動贊助 | 免費論壇 | 天堂私服 | 天堂123 | 台南清潔 | 天堂 | 天堂私服 | 免費論壇申請 | 抗ddos | 虛擬主機 | 實體主機 | vps | 網域註冊 | 抗攻擊遊戲主機 | ddos |