ave a select statement as follows, which runs very slow. I think it is the count or the subselect, but
I do not see how I could optimize it. I tried using hints, Ordered and All Rows, but it did not do speed up
the retrieval. The tables are indexed.
SELECT CASE
WHEN (a.type =...