|
-
I put the calculation into ..
CREATE OR REPLACE FUNCTION F1 (P1 NUMBER) RETURN NUMBER DETERMINISTIC IS
BEGIN
RETURN round(power(2,P1/12),8);
END;
/
and called it from the select statement
CURSOR test_update IS
SELECT x_pos, y_pos, F1(MEASUREMENT1) the_result, done
FROM measurement_table
ORDER BY x_pos, y_pos
FOR UPDATE OF measurement1, done;
In my test table there are 176000 records and 873 unique values of measurement1.
The time taken was 1m15s.
The original with the calculation in the select took 1m07s
The lookup table version took 38s
Looks as though using this approach has slowed it down a bit.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|