K
kamil.jedrzejewski
I have one large table Tab1 on which I'm doing some very time-
consuming calculations (by query).
I can only add new data to this table, older date can't be changed.
But on daily basis new data is appended to this table, and should also
be recalculated.
I think that it will work faster, if I do my calculations just one
time and assign them to my table (as additional column).
Example
Tab1
ID::field1
1::a
2::b
3::a
4::a
Result:
Tab1_ver2
ID::field1::newcolumn
1::a::1
2::b::1
3::a::2
4::a::3
My calculation is to create from field f1 second key by adding counter
to it.
Pieter Wijnen helped me with numbering solution:
SELECT (SELECT COUNT(*)+1 FROM P1 WHERE P1.ID < P.ID AND
P1.FIELD1=P.FIELD1)
AS ROWNUM, P.*
FROM P
Now I want to add this ROWNUM field to my table. Is it possible?
Thanks for help
Kamil
consuming calculations (by query).
I can only add new data to this table, older date can't be changed.
But on daily basis new data is appended to this table, and should also
be recalculated.
I think that it will work faster, if I do my calculations just one
time and assign them to my table (as additional column).
Example
Tab1
ID::field1
1::a
2::b
3::a
4::a
Result:
Tab1_ver2
ID::field1::newcolumn
1::a::1
2::b::1
3::a::2
4::a::3
My calculation is to create from field f1 second key by adding counter
to it.
Pieter Wijnen helped me with numbering solution:
SELECT (SELECT COUNT(*)+1 FROM P1 WHERE P1.ID < P.ID AND
P1.FIELD1=P.FIELD1)
AS ROWNUM, P.*
FROM P
Now I want to add this ROWNUM field to my table. Is it possible?
Thanks for help
Kamil