[wp-testers] Wordpress scaling problems

matthijs matthijsenator at gmail.com
Thu Jan 29 19:43:34 GMT 2009


It's a good explanation for how wordpress does things currently. Thanks for
that.
I still don't agree about the performance issue mysql vs php. The first page
in any php/mysql book explains how you should build your code and queries in
such a way that you retrieve out of the database exactly what you need,
instead of getting everything out and then trying to "query" that within php
to get the real result your need.

But let's not derail the thread into that. We're probably thinking about
different scenarios.

Simple. They don't use bad permalink strategies.
>
> You too can scale WordPress to ridiculous numbers of pages. Just don't
>
> put "category" in the permalink string. Easy.
>
>
Now that I am aware of the problem, it might be possible to choose different
permalink strategies for my sites (even though I might not want to, good
URLs are very important to me). But it's something else if your client calls
you and asks why their site is so slow suddenly. And I can't change around
the permalinks of their site now that it's been life for almost 2 years.


The reason it has to suddenly run 2400 queries is not because the
> field is so large that it doesn't fit, but that your configuration is
> wrong so that there is a timeout or a max query size or some other
> parameter being exceeded.


What configuration are you thinking about? How could I research that? I'm no
server administrator and have no control over most of the servers my sites
are on. But sometimes it's possible to override configuration settings with
htaccess. For the site I have the problem with I still need a long term
solution (of which changing the permalinks is not one).


There's no particularly good all-around solution, unless you want to
> precalculate every possible URL and store them in a separate table
> with that URL as the index. Then it's one query for all cases, but
> maintaining that table becomes difficult and problematic. It also
> becomes static, without the ability to adapt to new cases. Perhaps
> this is the way to go for the future, perhaps a plugin could make this
> sort of optimization by overriding the rewrite system. But it seems
> like more trouble than it's worth, really.
>

Yes, it's probably a bit of a rewrite of some code to adapt it to such a new
situation. But I don't think maintaining the table would be more problematic
then it is now to maintain the single serialized array. It's just a
different kind of storage, isn't it?

I'm actually surprised that not that many people encounter this scaling
issue (yet). Many sites have the category as the base for their permalinks
and there are probably enough sites out there with more then a few hundred
or thousand pages.


More information about the wp-testers mailing list