Report Definition running slow on 1st Run. But works fine during second run
Can you please suggest about the reason why the report definition is running slow during 1st run. But the same is running fine in 2nd run. Also, when I have investigated I found out that getcontent activity is taking maximum time in both the runs. For example in 1st run it took 24 seconds and in second run it took 0.7 seconds. I am not sure where to tuneup as there is vast difference between both the runs.
Tracer should be able to give you some detail regarding where in the retrieval activity the extra time in the 1st run is being spent. If you enable DB Query events, it will also tell you if the SQL query is taking longer on the first run.
This should help you start narrowing down the location of the issue.
In most of the cases it's because of DB cache (not Pega cache!). So if you already sent one sql request (heavy) and the db processed it, it will cache the results (most probably, the execution plan) and from second run it will retrieve results faster