Skip to Content

Best method to use LAG - A window function in Scripted calculation View.

Hello Community,

I am struggling with performance issue - with LAG - a window function when used in Scripted calculation view. In my scenario I am having a single column table with 7 columns and 1.5 Million records.

When I run the Calculation view (scripted) then output takes more than 10 seconds.

Please suggest the best possible way to use the LAG function on a single table.

Awaiting response.


Kumar ๐Ÿ˜Š

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on May 07, 2014 at 10:25 AM

    Hi Kumar,

    As you said the source have 1.5mi rows, but the question is. Are you making the window function over 1.5mi?

    Is your filters properly set to provide a filter push down?

    Do you have input parameters to reduce the dataset before windowing?

    You can answer all these questions investigating the Visual Plan.

    Regards, Fernando Da Rรณs

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.