Can't figure this one out... when I execute a select query it shows an explain plan cost of ~4500 and takes ~3 seconds to return. When I wrap that query (no changes) inside of:
select count(*) from (
/*query here*/
)
It times out. It's at 5 minutes and counting now.
I tried this in SQL Developer and Aqua Data Studio -- same results.