<div dir="ltr"><div>Hi Ishii San,</div><div><br></div><div>The patch looks good, and I believe the approach covers the performance concerns.</div><div><br></div><div>Thanks</div><div>Best regards</div><div>Muhammad Usama</div><div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Apr 15, 2023 at 5:06 AM Tatsuo Ishii <<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">>> On 14-Apr-2023, at 5:37 PM, Tatsuo Ishii <<a href="mailto:ishii@sraoss.co.jp" target="_blank">ishii@sraoss.co.jp</a>> wrote:<br>
>> <br>
>> Hi Usama,<br>
>> <br>
>>> Thanks for conducting the tests.<br>
>> <br>
>> No prolem.<br>
>> <br>
>>> 3-4 % seems quite a significant degradation. So one possible way would bet<br>
>>> retire the<br>
>>> minimal parser and always use the standard parser so that we can save the<br>
>>> extra scanning<br>
>>> needed for the detection of multi-statement queries.<br>
>>> <br>
>>> It (removing minimal parser altogether) may be less of a performance<br>
>>> overhead than this. What is your opinion?<br>
>> <br>
>> Is it possible to run the extra scanning only for lengthy queries(say,<br>
>> longer than 10k)? i.e.<br>
>> <br>
>> If (lengthy query)<br>
>> extra scanning;<br>
>> if (single-statement)<br>
>> minimal_parser = true;<br>
>> else<br>
>> minimal_parser = false;<br>
>> else<br>
>> minimal_parser = false;<br>
>> fi<br>
>> raw_parser (minimal_parser);<br>
>> <br>
>> With this, we can avoid the extra scanning for most queries. I think<br>
>> the minimal parser is best for lengthy queries.<br>
>> <br>
> <br>
> Agreed, I guess that makes total sense<br>
<br>
Attached is a patch for this direction. What do you think?<br>
<br>
Best reagards,<br>
--<br>
Tatsuo Ishii<br>
SRA OSS LLC<br>
English: <a href="https://url.avanan.click/v2/___http://www.sraoss.co.jp/index_en/___.YXAzOnBlcmNvbmE6YTpnOjNmMjQwMWRlZTIzYjlkODcyYWYyNTNkNWQ0ZmNjMjg0OjY6M2ZiYjo0ZDAzZjNiODFhNDhiMTA0MTdiMjBmOGJlOTA5YjBmZDEyYmZmNjM4YzRlYjQ5MWM3NDY3YzhhNjhiZDY3NDViOnA6VA" rel="noreferrer" target="_blank">https://url.avanan.click/v2/___http://www.sraoss.co.jp/index_en/___.YXAzOnBlcmNvbmE6YTpnOjNmMjQwMWRlZTIzYjlkODcyYWYyNTNkNWQ0ZmNjMjg0OjY6M2ZiYjo0ZDAzZjNiODFhNDhiMTA0MTdiMjBmOGJlOTA5YjBmZDEyYmZmNjM4YzRlYjQ5MWM3NDY3YzhhNjhiZDY3NDViOnA6VA</a><br>
Japanese:<a href="https://url.avanan.click/v2/___http://www.sraoss.co.jp___.YXAzOnBlcmNvbmE6YTpnOjNmMjQwMWRlZTIzYjlkODcyYWYyNTNkNWQ0ZmNjMjg0OjY6YjQ4ZjphZDYzYTEyODA1YTNmMTZkOTAwZDAyNWFhODZkY2EyNzVlZTc3NTFlZDQyNmIxYTYyMjE3MDA5N2I0NTA4MDFmOnA6VA" rel="noreferrer" target="_blank">https://url.avanan.click/v2/___http://www.sraoss.co.jp___.YXAzOnBlcmNvbmE6YTpnOjNmMjQwMWRlZTIzYjlkODcyYWYyNTNkNWQ0ZmNjMjg0OjY6YjQ4ZjphZDYzYTEyODA1YTNmMTZkOTAwZDAyNWFhODZkY2EyNzVlZTc3NTFlZDQyNmIxYTYyMjE3MDA5N2I0NTA4MDFmOnA6VA</a><br>
</blockquote></div></div>