[development] Long database updates

Gerhard Killesreiter killesreiter at physik.uni-freiburg.de
Sat Dec 3 06:55:24 UTC 2005



On Fri, 2 Dec 2005, Neil Drumm wrote:

> Occasionally we need a database update which iterated over each node
> individually. Since these are a least O(n) operations, we can't trust
> them to be fast because Drupal runs some big sites. At the same time we
> can't rely on our ability to change PHP's timeout since safe mode might
> be on. We don't want to take a long time to do the update without
> sending feedback to the user since the server churning away looks the
> same as the server hanging.

In such cases it is worthwhile to investigate if it is possible to offload
some of the load to the SQL server as I have done for the first revisions
update.

> We have two long updates. The forthcoming revisions update promises to
> be a resource hog.

It is not /that/ bad. For example Drupal.org recently only had about 750
nodes with revisions.

> Update 124 needs to iterate every comment.

No idea what it does, but maybe SQL can come to the rescue.

Cheers,
	Gerhard


More information about the development mailing list