Search Postgresql Archives

Re: Reading execution plan - first row time vs last row time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 1, 2024 at 9:53 AM Pecsök Ján <jan.pecsok@xxxxxxxxxxx> wrote:

We see significant difference in explain analyze Actual time in the first line of execution plan and Execution time in the last line of execution plan. What can be the reason?

 

For example, first line of execution plan:

Gather  (cost=1038.49..257627100.42 rows=7943222226 width=104) (actual time=531.925..3673159.806 rows=7943221053 loops=1)


It takes an hour for Postgres to gather up 7.9 BILLION (!) rows, but then it is going to take additional time to do something with all of those rows. That's where the rest of your time is going. Seeing your actual query would be a help. If this is a CTAS (Create Table As Select), then you have an hour for the 'Select' part, and the rest of your time is in the 'Create Table' part.

Cheers,
Greg


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux