sql - Different execution plans for Toad and Jasper Report? -
I have encountered a strange situation in which SQL queries take several seconds to complete when running from Todd And a Jasper report takes half an hour (with the same parameters) to generate results of the same question. Here are some details:
- I checked, and Oracle (version 11g) uses different execution schemes in these two cases.
- I considered using archived outlines, but the report modifies a bit query (the name of the bind variable is changed; in the case of many values, i.e. $ P! {...} , The report only includes values in the query, and despite this there are many combinations of values), so the settings will not work.
- I've reported through iReport 5.1 and OpenReports and it takes about 35 minutes for both.
- The basic questions are tuned with some signals, without them
I appreciate any advice about how to deal with it.
First of all, do not use the TOAD for query tuning. This is in Tod's interest, to make the application as responsive as possible to present the first few lines of the fastest possible result. To do so, TOAD indicates the FIRST_ROWS signal in your query. There is a nice feature, but not for tuning questions.
Now, that is taking a lot of time to address your query, I suggest that you check for the first time that the time is being spent as mentioned, You can do this by looking at the execution. Once you do this, and you know where the time is being spent, but you still do not know how to solve it, please post the execution plan and statistics.
Comments
Post a Comment