It seems like such a simple piece of code.
variable_set('myvar', 'thevalue');
But it can bring your site to its knees very quickly when used too much.
Overquerying
Recently on a few sites, when they are experiencing extreme slowness or throwing 503 errors we have found a single problem, variable_set();
. Trying to trace the issues back, using tools like mytop we see that there are lots of slow queries and many, many queries of: