Re: Optimize common expressions in projection evaluation

From: Peifeng Qiu <pgsql(at)qiupf(dot)dev>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Optimize common expressions in projection evaluation
Date: 2022-12-05 04:00:37
Message-ID: CAPH51bc0WbuJ0ym_dDGuPvRZPpE3OMvfNio79fPr836pua=cJw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> the need for this code seems not that great. But as to the code itself I'm unable to properly judge.
A simplified version of my use case is like this:
CREATE FOREIGN TABLE ft(rawdata json);
INSERT INTO tbl SELECT (convert_func(rawdata)).* FROM ft;
We have a foreign data source that can emit json data in different
formats. We need different
convert_func to extract the actual fields out. The client know which
function to use, but as
the each json may have hundreds of columns, the performance is very poor.

Best regards,
Peifeng Qiu

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2022-12-05 04:08:20 Re: Optimize common expressions in projection evaluation
Previous Message Dilip Kumar 2022-12-05 03:51:10 Re: Avoid streaming the transaction which are skipped (in corner cases)