Re: How do you like this SQL?

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Mon, 17 Dec 2012 19:57:35 -0000
Message-ID: <GtOdnVupoKy15FLNnZ2dnUVZ8mqdnZ2d_at_bt.com>


"joel garry" <joel-garry_at_home.com> wrote in message news:7ead80bc-5621-4892-abfd-0055335438f1_at_jl13g2000pbb.googlegroups.com...
|On Dec 17, 6:27 am, John Hurley <johnthehur..._at_gmail.com> 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: http://jonathanlewis.wordpress.com/2009/09/07/analytic-agony/ )

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

Original text of this message