Explain plan vs query run time

UDA
Enthusiast

Explain plan vs query run time

When i try running my query through an explain plan, kit just shows a total execute time of 15 Mins but when i run the Insert query it runs for 45 Minutes. Could there be a reason to it? How could i improve the performance?

Is it due to system load?
2 REPLIES
Enthusiast

Re: Explain plan vs query run time

Can you post your query to the forum?
There are many reasons why there is difference of time estimate and actual time of execution.
One fundamental reason:
Due to skewed distribution of data and the absence of collected statistics, the estimates are calculated based on Random AMP sampling which might throw uneven numbers.

Enthusiast

Re: Explain plan vs query run time

Ad 1
>> When i try running my query through an explain plan,
>> kit just shows a total execute time of 15 Mins
>> but when i run the Insert query it runs for 45 Minutes.
>> Could there be a reason to it?

It's just a time for one session on the reference system.

Ad 2
>> How could i improve the performance?

It depends on your system details ...

Ad 3
>> Is it due to system load?

Partially.
Estimate: "Estimated time" * "Ratio to the reference system" * "Percent of system "