Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2005-11-01 10:28:08
- albertext
- New Member
- Registered: 2005-05-08
- Posts: 7
Database design doubts
Hi,
I’m not a database guru but I have some doubts regarding the database design for TXP.
There are many strange choices: as an example I would not place categories and custom fields in the textpattern table. The rule is to create separate tables and link them with a bridging table if there is a many-to-many relation. In contrast WordPress database seems to have a more rational design.
Of course normalization in database design is not a religion – you can break the rules if you want. Moreover these choices are hard to reverse with a simple upgrade release.
However I’m wondering about the consequences of these db design choices on overall application performance especially in sites with many, many visitors.
What do you think about it?
Offline
Re: Database design doubts
I’ve answered questions regarding architecture earlier, for example here:
http://forum.textpattern.com/viewtopic.php?id=11037
Admittedly focus for Textpattern has been in areas other than architectural purity. Some decisions were made very early and have just been carried along. Certainly some things would be made differently if the project would be started from scratch today – but we don’t have that luxury. Will some things you mention change in the future? Possibly, but it won’t happen just for the sake of having an academic label in the form of “our db-schema meets the requirements for Boyce-Codd normal form”.
You are asking:
However I’m wondering about the consequences of these db design choices on overall application performance especially in sites with many, many visitors.
What do you think about it?
No they don’t have any effect. And yes, I have tested it. Normalizing data and breaking up tables into “true” relations has many advantages and should be the way to go, but it does not have a positive effect on performance, it possibly has an adverse effect (usually requires more joins).
And apart from theoretical considerations, benchmarks speak a fairly clear language. Last I checked, Textpattern outperformed WP by heaps and bounds. And Textpattern has improved considerably since then. (Though I’ve been wary in releasing any updated benchmarks after joining the textpattern development team). And in certain, special cases WP performs even worse.
Last edited by Sencer (2005-11-01 11:26:06)
Offline
#3 2005-11-01 11:25:04
- albertext
- New Member
- Registered: 2005-05-08
- Posts: 7
Re: Database design doubts
Hi,
thanks for your quick reply!
What do you think about changing one or more custom fields from varchar to text in the textapttern table?
http://forum.textpattern.com/viewtopic.php?id=12242
Any side effect on performance?
Offline
Re: Database design doubts
Yep using liaison table is more flexible (welcome to n categories per article), but it would slow things done as it require one more join. I don’t know how big the perf hit would be in a standard shared environnent though.
Offline
Pages: 1