Search Postgresql Archives

Re: Query plan: SELECT vs INSERT from same select

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

 



Alexander Voytsekhovskyy <young.inbox@xxxxxxxxx> writes:
> You can see explain analyze verbose here:
> https://explain.depesz.com/s/AEWj

> The problem is, when i wrap it to

> A)
> INSERT INTO norepl_1542_result (axis_x1, axis_y1, v_1)
> SELECT .... SAME QUERY

> OR even

> B)
> WITH rows AS (
> ... SAME SELECT QUERY ...
> )
> INSERT INTO norepl_1542_result (axis_x1, axis_y1, v_1)
> SELECT * FROM rows

> The query time dramatically drops to 500+ seconds.

> You can see explain analyze verbose here
> https://explain.depesz.com/s/AEWj

That's the same link.

> As you can see, 100% of time goes to same SELECT query, there is no issues
> with INSERT-part

We can't see any such thing from what you posted.

			regards, tom lane





[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 Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux