Thank you all for the responses. I think we're going to try replicating the databases with Slony. Wish me luck! Tony On 10/11/07 6:23 PM, "Chris" <dmagick@xxxxxxxxx> wrote: > Tony Grimes wrote: >> Splitting the tables probably wouldn't work. Most of the tables are used by >> both sites and the ones that aren't are tied to the rest by foreign keys. >> >> Most of the updates are done from the admin site, so we're toying with the >> idea of creating a read-only data warehouse for the website. The sync would >> be one way from main office db to the warehouse (say, every 10 minutes). > > No need to create something that has already been done. > > Use slony or something to replicate the database. > >> Any updates the website does (like an event registration or profile update) >> would be done remotely to the office db. In this scheme the website db would >> be 10 minutes behind. We can live with that. > > When you do a registration, get it to use a remote database connection > instead of the 'local' one. > > $local_connection = pg_connect('localhost....'); > > $remote_connection = pg_connect('remote_server_ip....'); > > $remote_result = pg_query($remote_connection, $query); > >> Doing everything by remote connection would be easier, but we're worried >> about the performance. > > The only way to find out would be to test it really. As long as you have > a decent connection in to the office and a decent connection on the > remote end and aren't pulling through a ridiculous amount of data in > queries (eg pulling through 50,000 records when you only really need > 10), you should be fine. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php