Reference this issue, although I did not create the issue: http://drupal.org/node/87074 Greetings all :) Nice work on Version 5! I recently had to make a Drupal 4.6 site connect to a MySQL and a PostgreSQL database at the same time. Of course, this isn't possible with the current implementation of database*.inc since the same functions are redefined in each inc file. I'd like to update my patch for HEAD and hopefully get this feature accepted for the next release. What I actually implemented was two separate features that can be split into different patches for consideration. 1. Allow connections to multiple different types of database servers. 2. Allow different table prefixes for each database connection. Hopefully others think this is a useful feature? :) Again, the issue I'm referring to on Drupal.org is http://drupal.org/node/87074 Thanks, -Rowan
On 18 Jan 2007, at 12:57 AM, Rowan Kerr wrote:
Again, the issue I'm referring to on Drupal.org is http:// drupal.org/node/87074
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.
On 1/17/07, adrian rossouw <adrian@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. Having different table prefixes per-db connection is another story (but one which I find quite useful since it allows you to use drupal's db api on other databases which may not contain a full set of drupal tables, or be configure the same as your primary database) ... perhaps that is genuinely worth a new issue. -Rowan
Rowan Kerr wrote:
On 1/17/07, adrian rossouw <adrian@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
On 18-Jan-07, at 3:42 AM, Gerhard Killesreiter wrote:
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.
I would be surpised if something this simple really impacted performance, but if no one is convinced that it's the right thing to do, some benchmarking will need to be done :) -Rowan
participants (3)
-
adrian rossouw -
Gerhard Killesreiter -
Rowan Kerr