Subject I suppose wrong generation of parenthesis in plan for recursive CTE
Author karolbieniaszewski
Hi

i try to understand plan returned by engine
i try to write something like IBPlanAnalyser but for Firebird.
But i reach problem with parenthesis in this plan.
Count of open parenthesis are not equal to count of close parenthesis.

PLAN (KAT_TREE KK INDEX (FK_KAT_KAT__ID_KAT_MASTER)), KO INDEX (FK_KAT_OBJ__ID_KAT), JOIN (ZS INDEX (FK_ZLEC_SERW__ID_OBJ, FK_ZLEC_SERW__ID_ZLEC_STAL), O INDEX (RDB$PRIMARY98))), U INDEX (PK_UNISLOWNIK__ID)), UPAR INDEX (PK_UNISLOWNIK__ID))), ZSC INDEX (PK_ZLEC_SERW__ID)))

whis query use recursive CTE like

WITH RECURSIVE
KAT_TREE AS
(
SELECT
KU.ID_KAT AS KAT
FROM
KAT_UZYTK KU
WHERE
KU.ID_UZYTK=71

UNION ALL

SELECT
KK.ID_KAT_DETAIL AS KAT
FROM
KAT_KAT KK JOIN KAT_TREE KKT
ON KKT.KAT = KK.ID_KAT_MASTER
)
all others tables in plan are normal table join

i suppose that engine generate readable plan wrongly
should i post this ass issue into FB tracker or this is known issue?

Karol Bieniaszewski