[pgpool-hackers: 4322] Re: minimal parser and multi-statement query

Tatsuo Ishii ishii at sraoss.co.jp
Sat Apr 15 09:04:43 JST 2023


>> On 14-Apr-2023, at 5:37 PM, Tatsuo Ishii <ishii at sraoss.co.jp> wrote:
>> 
>> Hi Usama,
>> 
>>> Thanks for conducting the tests.
>> 
>> No prolem.
>> 
>>> 3-4 % seems quite a significant degradation. So one possible way would bet
>>> retire the
>>> minimal parser and always use the standard parser so that we can save the
>>> extra scanning
>>> needed for the detection of multi-statement queries.
>>> 
>>> It (removing minimal parser altogether) may be less of a performance
>>> overhead than this. What is your opinion?
>> 
>> Is it possible to run the extra scanning only for lengthy queries(say,
>> longer than 10k)? i.e.
>> 
>> If (lengthy query)
>>  extra scanning;
>>  if (single-statement)
>>    minimal_parser = true;
>>  else
>>    minimal_parser = false;
>> else
>>  minimal_parser = false;
>> fi
>> raw_parser (minimal_parser);
>> 
>> With this, we can avoid the extra scanning for most queries. I think
>> the minimal parser is best for lengthy queries.
>> 
> 
> Agreed, I guess that makes total sense

Attached is a patch for this direction. What do you think?

Best reagards,
--
Tatsuo Ishii
SRA OSS LLC
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: use-psqlscan-only-when-necessary.patch
Type: text/x-patch
Size: 2308 bytes
Desc: not available
URL: <http://www.pgpool.net/pipermail/pgpool-hackers/attachments/20230415/36247831/attachment.bin>


More information about the pgpool-hackers mailing list