Subject SubSelect problems
Author jasajona

I have big database (about 50 tables). I run huge select on several
tables. That select has 3 subselects. Sometimes (I cannot reproduce)
this select is running very slow (about 100x slower than normal), all
that time about 1 hour server cpu stays loaded 100% (normaly this
query runs about 10s), statistics shows that were fetched milions of
records (in fact where sould be just about 1000). The same thing
happening from console and from my app. Sometimes if I reboot server
(Linux 1.5.2 FB) select starts to run normaly.
If I use COALESCE(subselect, null) or even parameter in my subselect
this slows down about 30%.

This could be FB bug, I can send my database and app or at least that
query if anyone can help me.