Home » Server Options » Replication » Data Population
Data Population [message #152326] Thu, 22 December 2005 09:19 Go to next message
geetha_sathish
Messages: 1
Registered: December 2005
Junior Member
A temporary Table needs to contain upto-date data for generating online reports..

There are 2 options for populating data in that table periodically.


First way is to delete the existing data and populate the table with latest data.

Second way is to update the temporary table with the differences found in the base table.
( update column values/insert newly added rows/delete invalid rows)

Pls suggest which method is efficient to fulfill the requirement.
Re: Data Population [message #152461 is a reply to message #152326] Fri, 23 December 2005 06:33 Go to previous message
orausern
Messages: 826
Registered: December 2005
Senior Member
Hi,

Suggestion for such a requirement should be based on actual testing..

I am assuming that by efficient method, you mean one that is completed fast.
So,

You can try to measure time by set timing on. try the first method and measure time, and test with the second option.

One suggestion for first option is: instead of deleting the data, you can truncate the table as that will be done faster.
Also in second method: you can try to use the merge statement so that only new records are added.

Also these two methods are not exactly similar...I mean in first method , you are deleting existing data..so you will never be able to see those deleted data. And in second method, you will be able to see those deleted data.

so decide on whether you need those existing data or not. If you need, then you MUST not delete. If you do not need, then why should you keep it.

hth.
N.


Previous Topic: refresh option
Next Topic: materialized view logs
Goto Forum:
  


Current Time: Thu Mar 28 15:28:39 CDT 2024