Hello everyone!

I started exploring Drupal and I must say it is great! But I'm not sure to invest time and build a Drupal site because of speed and scalability. Recently I found an article "The Drupal Database Design is a Comedy of Errors"

http://www.hiveminds.co.uk/node/904
 

Rather than go through a bunch of queries or rather hundreds of queries, I will just say that the database design has no relational qualities that would optimize and speed up the system what so ever.

And some notes about function _forum_get_vid()
 

The above code just makes me laugh. There are four queries involved ( two hidden in variable_set()) to return a vocabulary id

What can you say about it? Maybe Drupal 6 will redesign the database structures and speed up access?

Can anybody argue that Drupal is a right choice for multi-user site?
 

Comments

coofercat’s picture

I'm not a core developer, and not really an expert on such things, but... I would have to agree that there are some horrible bits of DB within Drupal. It's got it faults, most of which I get the feeling are known about, and possibly being thought about/worked on.

That said, the core of Drupal is pretty decent. I strongly suspect that other CMSes with similar features in use would have similar problems (again, I'm no expert, and I'm sure fans of Product X or Product Y can pipe up about how good theirs is versus Drupal, but I'll bet every product has it's foibals).

Using contributed modules with Drupal can cause subtle problems, because the design of each module is different, and of different quality. Some modules make repeated queries when they ought to be using static variables and so on. That said, some modules are arguably better quality than the dodgy bits of the core code. They're contributed modules and not core for a reason: their quality isn't known or quantified, so as an admin you have to evaluate them yourself.

All that said, I think disregarding Drupal altogether because of some core inefficiency may be a bit heavy handed. Drupal is responsible for some pretty big websites around the world, some of which command broad user bases. That said, I don't think those sites just popped up - they're probably the result of a good deal of bespoke development, theming and styling.

Lastly, I don't suppose you need telling, but if you spot something that could be done better, post it here on Drupal.org (better still, suggest and alternative, make a patch or whatever). In my meagre experience, the core devs are keen on making things better, but they aren't prepared to hack something in quickly just to get it done, so you may need to work with them a bit (oh, and they seem incredibly busy too).

Oh, incidentally, some related chat here: http://drupal.org/node/144239

yelvington’s picture

Let's see if I understand your issue.

Some random blogger installs Drupal, takes one quick look, doesn't understand the underlying system, jumps to conclusions, and you're taking it seriously?

The cited blogger doesn't know what he's talking about. Read the code.

The cited code runs one very simple query to check the variables table and returns the retrieved value unless some critical information is, for whatever reason, missing.

If the value is missing, the function repairs the problem. First it attempts to discover a taxonomy that is mapped to the forum node type. If one is discovered, then the variables table is updated. If one is not discovered, one is created by default, and the variables table is updated.

In any case, this is not a performance problem.

The cited blogger claims "This is made especially clear by the fact that there are two hardcoded strings in the code that are the same strings in the row being called from the database."

Hello? Those are the keys. We're looking for values.

Before accepting random comments from random bloggers you might want to subscribe to the Drupal developer list and monitor the discussions. You would learn some things.

mdixoncm’s picture

I would be the first to admit that Drupal does have performance issues - BUT this is always going to be the case with a system that is just so so flexible. The performance issues are not down to bad DB design - they are purely down to the amount of work that Drupal has to do cater to cater for all possibilities. At the end of the day, this is not just a Drupal specific problem - all the big CMSs suffer from something similar.

You also have to consider the fact that Drupal is built to run on either Postgres or MySQL - and consequently is optimised for neither. A good example of this is that the Mysql auto incrementing feature is not used, and instead an extra query is made to the sequences table on every insert.

Can anybody argue that Drupal is a right choice for multi-user site?

If you have the money (or the time and skill), to build a framework that does exactly what you want and only what you want then the chances are that you'll get something that out performs Drupal - if you don't and you want a flexible, well supported, extensible system (and don't forget its free) then yes Drupal is the right choice.

Like books? Check out booktribes the new (Drupal based) community for book lovers
from Computerminds