Subject Re: [ib-support] Odd performance burst.
Author Svein Erling Tysvær
>An odd thing happens when I've just added a sting field (varchar(255)) to
>"PCategories":
>that query runs faster about 10 times.
>What happened? I can't explain that.

Strange - and interesting. Hope someone can explain why. What happens if
you try

select * from Category_Related CR
where (
exists (select 1 from PCategories PC
where (PC.ID = :CatgryID or
PC.ParentID = :CatgryID)
and PC.ID = CR.PCategory) or
exists (select 1 from PCategories PC
join PCategories PC2 on PC.ParentID = PC2.ID
where PC2.ParentID = :CatgryID
and PC.ID = CR.PCategory) or
exists (select 1 from PCategories PC
join PCategories PC2 on PC.ParentID = PC2.ID
join PCategories PC3 on PC2.ParentID = PC3.ID
where PC3.ParentID = :CatgryID
and PC.ID = CR.PCategory)
order by Item_Description;

Is it still slow? And does the added field still effect execution time?

Set