Earlier quoted context omitted.
Just to clarify, when you say LEAD/LAG here, do you actually mean ROWS/RANGE? So, approximately: sum(price * quantity) over w / sum(quantity) over w as VWAP ⋮ window w as (partition by stock order by time range 30000 preceding) Totally willing to believe first-hand experience, but surprised and disappointed if it's impossible to make that fast. (Apologies if I'm totally misunderstanding the use case).
Is there really that much of a difference between LEAD/LAG and OVER+RANGE when using an aggregation function? I'm sure there is, but it has been a few years since I had to deal with some of this. There are probably also difference between OVER when used in TSQL and PLSQL. Last time I had to do this was actually with real-time advertising bidding, and it was across keywords, not ticker symbols (many more, much sparser…
How about Oracle 12c's MATCH_RECOGNIZE, though?
http://www.oracle.com/ocom/groups/public/@otn/documents/webc...