You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Date: 2002-01-25 23:30
Sender: nobody
Logged In: NO
We ran into similar issue, this time with just tables. It
seems that doing a mix of inner and left outer joins on the
same table have often broken plan.
And the best part of it, if we try to force the correct plan
(by using PLAN clause), Firebird just crashes :-(
If someone is actually interested, I can mail entire DB
along with the SQL used.
Submitted by: Mustafa YILMAZ (myilmaz)
Assigned to: @ArnoBrinkman
SFID: 508594#
Submitted By: myilmaz
bad plan with view
test case
CREATE TABLE TABLE1
(
T1F1 INTEGER NOT NULL PRIMARY KEY,
T1F2 VARCHAR(40)
);
CREATE TABLE TABLE2
(
T2F1 INTEGER NOT NULL PRIMARY KEY,
T2F2 INTEGER,
T2F3 VARCHAR(40),
FOREIGN KEY (T2F2) REFERENCES TABLE1(T1F1)
);
CREATE VIEW VIEW1
AS
SELECT * FROM TABLE1;
CREATE VIEW VIEW2
AS
SELECT * FROM TABLE2;
SELECT *
FROM TABLE1 T1
LEFT JOIN TABLE2 T2 ON T1.T1F1 = T2.T2F2
/*
USED PLAN JOIN (T1 NATURAL,T2 INDEX (RDB$FOREIGN10))
*/
SELECT *
FROM VIEW1 V1
LEFT JOIN VIEW2 V2 ON V1.T1F1 = V2.T2F2
/*
USED PLAN JOIN (V1 TABLE1 NATURAL,V2 TABLE2 NATURAL)
*/
The text was updated successfully, but these errors were encountered: