Why does my count(*) query time out but the inline view whose records it is counting does not?
Posted
by RenderIn
on Stack Overflow
See other posts from Stack Overflow
or by RenderIn
Published on 2010-05-11T15:36:47Z
Indexed on
2010/05/11
15:44 UTC
Read the original article
Hit count: 240
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.
© Stack Overflow or respective owner