[wp-trac] [WordPress Trac] #55463: Add a limit to _prime_*_cache functions
WordPress Trac
noreply at wordpress.org
Sun Jul 9 22:24:31 UTC 2023
#55463: Add a limit to _prime_*_cache functions
-------------------------------------------------+-------------------------
Reporter: spacedmonkey | Owner:
| spacedmonkey
Type: enhancement | Status: assigned
Priority: normal | Milestone: Future
| Release
Component: Cache API | Version:
Severity: normal | Resolution:
Keywords: good-first-bug has-patch 2nd- | Focuses:
opinion | performance
-------------------------------------------------+-------------------------
Changes (by soulseekah):
* keywords: good-first-bug has-patch => good-first-bug has-patch 2nd-
opinion
Comment:
I was unable to reproduce any difference between having a limit and not
having a limit whatsoever.
The query planner (EXPLAIN) and the query trace
(information_schema.OPTIMIZER_TRACE) are absolutely the same, apart from
the `rows_estimation` step in the `join_optimization`, where the
`range_analysis` `table_scan` estimated cost is actually higher (even
though the range scan is not performed) for a query with a LIMIT clause.
See screenshot above.
Any benchmarks done using mictrotime inside PHP itself will vary wildly
depending on kernel scheduling (other tasks running), if you run the two
versions over 6-12 hours on an idle machine (preferably bare-metal
hardware, as VPS's tend to be noisy as well) the results should converge.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55463#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list