On Mon, 14 Nov 2005, Philip M. Gollucci wrote:
Leo Lapworth wrote:
 Put all your virtual hosts in one database, just start the table names
 differently

 so instead of <virtual_db>.tablename have
 application_db.<virtual>_tablename

 This way apache only have to connect to one database.

 There may be all sorts of reasons you don't want to do this - and from a
 design point of view
 it's a bit messy - but it would solve your issue.

True, that would work, but after a schema reaches a certain number of tables
things do start to degrade.

Namespaces are a good way of providing virtualization here.  PostgreSQL
supports them and I think Oracle probably does also.  Use a PerlAuthzHandler
to set the database connection namespace to $r->server_name or some derivation thereof and you can code for one virtual just as easily as for many in your response handlers.

Reply via email to