Hi,
I have a SCV which does the following:
1. Gets the security filters for the fact table
2. Applies the filter on the fact table & exposes the necessary columns from the fact table
Note - there are few input parameters on the SCV(2 being start and end time - filter to fact).
The problem:
When I do an initial select from the SCV(I am doing a distinct of 1 columns from the view), it give me the data in ~39s. The second time it gives the result in ~3 seconds. If I change the input parameters or the projected distinct column from the SCV, it takes ~39s. I was checking the plan viz(see attachment).
Question:
1. If you check the Timeline section, under CeSqlPop(which starts at 2nd sec), the compilation step starts after 40th sec. I am assuming its doing the compilation of the SCV stored procedure(The procedure that gets created for every SCV). But before that, the graph shows nothing. What is happening between 2sec - 40sec. I am loosing out on ~35seconds.
Anyone can shed some light into this behavior
.
Thanks in advance,
Aswath M G