Replicating Results of Queries on Oracle I wan to setup a database such that its data come from queries run on a remote database.  Basically the source database is very slow and we have no control over it.  So, I want to create a second database such that it would run the queries periodically on the source database, and saves the results into this second database.  Thus our team would only have to deal with this second database which is simpler and much faster.

Now, my question is what is the best way to run the queries and then save the result into the second database. I can use Java to do this, but I think there are better, and more efficient, database specific way of doing this.  Note that I don't want to just replicate tables, but result of queries.

Thanks,
Alison
Depends how much data you need on the second database. Solutions are not to save query results on a second DB but duplicate data for querying on another DB. Basically the following technologies:


Oracle Streams: it is a replication from one database to another one. Can be done by table or by schema.
Oracle Active Dataguard: it is basically a standby DB open in ReadOnly for query. It is the standard oracle solution for the real time query. This requires a supplemental license
ETL: as suggested in the comment you can setup some ETL jobs using either an ETL tool or manually creating some stored procedure access data on remote DB. ETL is not, usually, a realtime process.
MATERIALIZED VIEV: if data and tables are a very small set you can create some MVs on your second DB that update periodically. Again this is not likely a realtime process and also may add load on primary DB.


In any case you need a sort of access to the primary DB. If you do not have any access apart the standard used you use for normal access through you application probably you can implement only ETL with a stored procedure or materialized view.