I have constructed a UNION that I place in a VIEW. The UNION involves 13 tables. This seems to slow it down quite a bit. To make matters worse I'm running the UNION for a view.
To speed it up I have removed all the JOINS from the selects and added a 'WITH READ ONLY' clause at the end of the VIEW.
I'm wondering if there is anything else I can do?
The statment is pretty simple:
CREATE OR REPLACE VIEW unionquery AS
SELECT H.ONEKEY AS ONEKEY, A.TWOKEY AS TWOKEY, 'TYPE A' AS SOURCE
FROM TYPEA A
UNION
SELECT H.ONEKEY AS ONEKEY, A.TWOKEY AS TWOKEY, 'TYPE B' AS SOURCE
FROM TYPEB A
UNION
... same thing repeated 13 times
WITH READ ONLY
Is there any I can do?
Clayton T. Paige
claytonpaige@yahoo.ca
Programmer Extraordinaire
========================================================
"Who is General Failure? and Why is he reading my disk drive?"
To speed it up I have removed all the JOINS from the selects and added a 'WITH READ ONLY' clause at the end of the VIEW.
I'm wondering if there is anything else I can do?
The statment is pretty simple:
CREATE OR REPLACE VIEW unionquery AS
SELECT H.ONEKEY AS ONEKEY, A.TWOKEY AS TWOKEY, 'TYPE A' AS SOURCE
FROM TYPEA A
UNION
SELECT H.ONEKEY AS ONEKEY, A.TWOKEY AS TWOKEY, 'TYPE B' AS SOURCE
FROM TYPEB A
UNION
... same thing repeated 13 times
WITH READ ONLY
Is there any I can do?
Clayton T. Paige
claytonpaige@yahoo.ca
Programmer Extraordinaire
========================================================
"Who is General Failure? and Why is he reading my disk drive?"