Why a URL with a query is always slower than that without a query?

I find a strange thing. For a WordPress site, a URL with a query is always slower than that without a query, even no Cache plugin is installed/enabled and no CDN cache is enabled. For example:

http://www.example.com/?mytest=yes

will always slower than

http://www.example.com/

Below are some of my test:

  1. WP Fastest Cache disabled, URL with a query https://www.fastorslow.com/app/profile/3e875ed3-d45f-54fb-93a2-17466eeb8b79 is slower than the one without a query https://www.fastorslow.com/app/profile/7ef6f16f-6b0c-5ab6-9f1e-87c0c1a6a1aa

  2. With WP Rocket enabled, https://www.fastorslow.com/app/profile/af27e983-1a38-5870-98a3-6cc19825aee1 is slower than https://www.fastorslow.com/app/profile/86d36215-0caf-51d7-b690-d3126a081376

  3. Another server, https://www.fastorslow.com/app/profile/9273fb55-adfc-5b8c-aa93-687bc128a95d is slower than https://www.fastorslow.com/app/profile/51062160-fb20-5b0b-97ba-4ce428ba264c

Why?

Topic cache query Wordpress performance

Category Web


When you run a search (you call it a query) WordPress must use its DBMS (MariaDB / MySQL) to examine the entire text of every post, page, and user on your site. That takes time. There are some plugins out there to make search more efficient, but it is still work for your site to do.

I like the Relevanssi plugin for improving search.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.