Problem in performance
Posted: Fri Mar 16, 2007 8:54 pm
I had source like this
Key value Start_dt
1 100 01/02/2007 00:00:10
1 101 01/02/2007 00:00:15
1 100 01/02/2007 00:00:45
1 100 01/02/2007 05:05:10
2 900 01/03/2006 00:00:19
so any number of events can occur in day
so im only intersted if the value field changes from the previous value
so my target should have something like this
Key Value Start_Dt End_Dt
1 100 01/02/2007 00:00:00 01/02/2007 00:00:14
1 101 01/02/2007 00:00:15 01/02/2007 00:00:44
1 100 01/02/2007 00:00:45
2 900 01/03/2006 00:00:19
source and target are oracle database.
Currently i writing 1 record in database commiting it and comparing the second record if it has same key and value field changed then i updating the 1 record with 2nd record start_dt - 1 second and writing the second record into the table.
It is taking for ever for me to finish my job due to huge volume of data
SO there is anyother way to do this type of things within less time.
Key value Start_dt
1 100 01/02/2007 00:00:10
1 101 01/02/2007 00:00:15
1 100 01/02/2007 00:00:45
1 100 01/02/2007 05:05:10
2 900 01/03/2006 00:00:19
so any number of events can occur in day
so im only intersted if the value field changes from the previous value
so my target should have something like this
Key Value Start_Dt End_Dt
1 100 01/02/2007 00:00:00 01/02/2007 00:00:14
1 101 01/02/2007 00:00:15 01/02/2007 00:00:44
1 100 01/02/2007 00:00:45
2 900 01/03/2006 00:00:19
source and target are oracle database.
Currently i writing 1 record in database commiting it and comparing the second record if it has same key and value field changed then i updating the 1 record with 2nd record start_dt - 1 second and writing the second record into the table.
It is taking for ever for me to finish my job due to huge volume of data
SO there is anyother way to do this type of things within less time.