Re: How do you like this SQL?

From: Jonathan Lewis <>
Date: Mon, 17 Dec 2012 19:57:35 -0000
Message-ID: <>

"joel garry" <> wrote in message
|On Dec 17, 6:27 am, John Hurley <> wrote:
|> 15 minute hog now runs in 20 seconds.
|> I owe you a beer Mladen!
|Cool! Nice example to reference, guys. Analytics do indeed rock.

I don't really need to say it for present company, of course, but they're not a silver bullet. Analytics sometimes rock - and Oracle has had a built-in transformation since 10g to convert an aggregate subquery (of exactly this type) into an analytic approach - but, as ever, it's very much dependent on the data that's there, the data you want, and the indexes you have in place. The subquery strategy often depends on the number of times the subquery has to run, or how Oracle unnests the subquery; the analytic strategy often depends on how large a volume of data goes into the analytic sort. (see: )

Jonathan Lewis Received on Mon Dec 17 2012 - 20:57:35 CET

Original text of this message