[wp-hackers] Permalink Performance

Johan Eenfeldt johan.eenfeldt at gmail.com
Sat Sep 4 14:47:58 UTC 2010


On Thu, Sep 2, 2010 at 7:51 PM, Otto <otto at ottodestruct.com> wrote:
> [ good description of good vs. bad permalink structures snipped! ]
>
> Also, this only actually causes a problem if you have a lot of Pages.

... or many attachments (pictures) on even a few pages as every single
attachment results in a number of extra rewrite rules.

I recently debugged the suddenly miserable performance of a site with
just ~30 pages -- but lots of pictures.

The rewrite rules had grown so huge they didn't transfer correctly
(larger than effective max_allowed_packet) and were being re-generated
each pageload resulting in 3000+ extra SQL queries.

So it is not just the number of pages that matter.

If you are forced to use a bad permalink structure (because of
historic reasons or whatever) at least consider stripping the
attachment stuff from the resulting rewrite rules. I can pretty much
guarantee you're not using it and it makes quite a difference.

/ Johan


More information about the wp-hackers mailing list