The default behavior for node_load() is to return the latest revision, however all of the revisions are retreived from the database in all situations. This could be slow if the serialized data is very large (with many revisions).

It would be faster to not select the revisions field if $revision is set to NULL with many revisions (it is currently selecting node.*).

Comments

Steven’s picture

Firstly, this sort of stuff belongs in a feature request on the issue tracker, not in the forum. But you should always search for existing related issues first.

Please take a look at the revisions patch which moves revisions into a separate table and solves many scalability issues.

--
If you have a problem, please search before posting a question.