Copying tables
Posted in 1997
Topics: General Discussion
Hi,
We currently have a system that involves two Informix databases, a
local Online 7 database and a remote Online 5 database. Because of
this remote connection we want to periodically take copies of certain
highly accessed tables on the remote system so that we 'cache' them
locally. While the duplication is taking place we cannot stop local
read access to the cached table.
The simple way seems to be something along the lines of...
DELETE FROM local_table;
INSERT INTO local_table (column_one,column_two)
SELECT column_one,column_two FROM remote_db@remote_machine:remote_table;
COMMIT WORK;
...but for some of the larger tables this is a slow process due to the
vast amount of locks that are created.
What is the best (fastest & secure) way of doing this?
Many Thanks In Advance
--
Kevan Heydon
Motiv Systems Ltd. | Email: k.heydon@motiv.co.uk
Orwell House | Phone: +44 (0)1223 576318
Cowley Road | Fax : +44 (0)1223 576319
Cambridge, CB4 4WY | WWW : http://www.motiv.co.uk/