ProjectSet - Mailing list pgsql-general

From Oliver Kohll
Subject ProjectSet
Date
Msg-id CAMS=m5KW59UHbwAU6pLWPd=Er5sydc-B_dv9X5AeZTpGRv3EAQ@mail.gmail.com
Whole thread Raw
Responses Re: ProjectSet
List pgsql-general
Hi,

I've just been running explain analyze on a slow query and came across something new to me - a node type of ProjectSet in the plan. What is that?


The query does a cross join of two tables to get every row in one combined with every row in the other, then runs the similarity function to compare text in them. The full query is below, apologies for the different obfuscation to the plan, if that's an issue let me know.

Is there an explanation of ProjectSet anywhere? I can't see one with a quick google or search of these archives.

Cheers
Oliver

---

SELECT table1.id,
    similarity(table2.field1::text, regexp_matches(table1.field3::text, 'product.ame:s*([^-]*)'::text, 'g'::text)::character varying(100000)::text)::double precision AS similarityscore,
    table1.ourid_g3a11eruac8ct55b,
    regexp_matches(table1.field3::text, 'product.ame:s*([^-]*)'::text, 'g'::text)::character varying(100000) AS products,
    table2.field1,
    table2.field2,
    table2.abaccount
   FROM table1,
    table2
  WHERE lower(table2.statusofingredient::text) < '6'::text AND lower(table2.statusofproduct::text) < '5'::text AND table1.fsacreated >= (date_trunc('day'::text, now()) - '30 days'::interval) AND lower(table2.bought::text) = 'bought'::text
  ORDER BY table1.id DESC NULLS LAST;

pgsql-general by date:

Previous
From: Alexandru Lazarev
Date:
Subject: Who and How is responsible for released installations packages and3rd party packs? (e.g. on https://yum.postgresql.org/9.6/redhat/rhel-7.3-x86_64/)
Next
From: ik
Date:
Subject: Re: Adding terminal title support for psqlrc