Poor performance of LAG function in view
543524Nov 2 2006 — edited Nov 2 2006Hi,
I have a query, containing a LAG function, that runs supper fast. I've created a view based on the exact query but when I select from it the performance is very slow. If I exclude the column, that gets its value from the LAG function in the underlying query, the performance is the same as the original query. Does anybody know how I can get the view's performance to be the same as the query, and why the view is so much slower when it uses the exact same SQL as the query?
Many thanks,
Johan