[wp-trac] [WordPress Trac] #61097: Filter `wp_count_posts()` query before execution to avoid slow query
WordPress Trac
noreply at wordpress.org
Sun Sep 21 04:44:23 UTC 2025
#61097: Filter `wp_count_posts()` query before execution to avoid slow query
-------------------------------------------------+-------------------------
Reporter: rcorrales | Owner:
| westonruter
Type: enhancement | Status: accepted
Priority: normal | Milestone: 6.9
Component: Posts, Post Types | Version: 2.5
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests has-test- | Focuses:
info commit | performance
-------------------------------------------------+-------------------------
Changes (by westonruter):
* keywords: has-patch has-unit-tests has-test-info => has-patch has-unit-
tests has-test-info commit
* owner: (none) => westonruter
* status: new => accepted
Comment:
@SirLouen Naturally the performance tests speak for themselves, but I
wanted to get an AI second opinion and sanity check on the query changes
since I don't have much experience with `UNION ALL` as I recall. I've
never used Claude, but I do have a Gemini subscription, so I generally use
it exclusively for all my AI needs since I'm already paying for it.
(I guess using Gemini could have been construed as marketing in the past
since I was employed by Google, but since I was laid off in April, I have
no financial interest here. As I understand, Gemini and Claude are not so
different in terms of capabilities. Nevertheless, I know you're just
having a bit of fun.)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61097#comment:25>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list