From: | Oliver Kohll <oliver(at)agilechilli(dot)com> |
---|---|
To: | David Rowley <david(dot)rowley(at)2ndquadrant(dot)com> |
Cc: | "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: ProjectSet |
Date: | 2018-08-02 13:16:05 |
Message-ID: | CAMS=m5K2qeeujKTNi=Jpe2KFwZGAps041YH5=HT7c0r-K-sttQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Ah thanks David, at least I know what it is now. I don't think I have any
set returning functions though will double check in case there's a joined
view that has one. Perhaps it could be the something to do with cross
product which similarly creates multiple rows on the right for each row on
the left side.
In any case, after deleting some obsolete rows, the plan seems to have
changed as the query now executes in a fraction of a second as opposed to
25 seconds.
Oliver
On 2 August 2018 at 13:21:32, David Rowley (david(dot)rowley(at)2ndquadrant(dot)com)
wrote:
On 2 August 2018 at 21:17, Oliver Kohll <oliver(at)agilechilli(dot)com> wrote:
> Is there an explanation of ProjectSet anywhere?
Plan node types and what they each do are not very well documented
outside of the source code.
ProjectSet appears when the SELECT or ORDER BY clause of the query.
They basically just execute the set-returning function(s) for each
tuple until none of the functions return any more records.
Simple Example:
EXPLAIN SELECT generate_series(1,2);
QUERY PLAN
-------------------------------------------------
ProjectSet (cost=0.00..5.02 rows=1000 width=4)
-> Result (cost=0.00..0.01 rows=1 width=0)
(2 rows)
--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Alexandru Lazarev | 2018-08-02 13:26:38 | Re: Who and How is responsible for released installations packages and 3rd party packs? (e.g. on https://yum.postgresql.org/9.6/redhat/rhel-7.3-x86_64/) |
Previous Message | Adrian Klaver | 2018-08-02 12:47:59 | Re: Who and How is responsible for released installations packages and 3rd party packs? (e.g. on https://yum.postgresql.org/9.6/redhat/rhel-7.3-x86_64/) |