[development] Improve multiple database handling

Gerhard Killesreiter gerhard at killesreiter.de
Thu Jan 18 08:42:30 UTC 2007


Rowan Kerr wrote:
> On 1/17/07, adrian rossouw <adrian at bryght.com> wrote:
>> This is a duplicate of http://drupal.org/node/19522
>>
>> I just updated with the DRUPAL 5 version of the patch, but I also harbor
>> some performance concerns,
>> especially since Dries benchmarked and found us losing a lot of time 
>> in the
>> db api.
> 
> Oops.. the other issue was the only one I saw in my search.
> Thanks for marking the dupe.
> 
> So it's basically the same solution as mine, then.
> 
> Although I didn't make an invoke hook, I just made eg. db_query use
> $db_type as a global variable and call db_($db_type)_query function.
> Maybe that's slightly quicker.
> 
> I think the flexibility of this feature (and properly supporting
> multiple db connections as advertised) is worth a slight performance
> hit.

I seriously doubt that. The performance hit would affect everybody 
whereas the feature is hardly ever needed. The database layer already 
needs more time than it should.

But: Providing benchmarks goes a long way.

Cheers,
	Gerhard


More information about the development mailing list