RE: Pg10 : Client Configuration for Parallelism ?

Поиск
Список
Период
Сортировка
От
Тема RE: Pg10 : Client Configuration for Parallelism ?
Дата
Msg-id 28619_1555511609_5CB73939_28619_199_1_A971FB43DFBC3D4C859ACB3316C9FF4632D98FA3@OPEXCAUBM42.corporate.adroot.infra.ftgroup
обсуждение исходный текст
Ответ на Re: Pg10 : Client Configuration for Parallelism ?  (Justin Pryzby <pryzby@telsasoft.com>)
Ответы Re: Pg10 : Client Configuration for Parallelism ?
Список pgsql-performance
Hello Justin and thank you for your clues.

Finally I found that putting blank to the option that limits the number of rows to retrieve (which is normal for this
kindof tool) allows PostgreSQL to parallelize the query. 

On jdbc it seems this is equivalent to write :
statement. setMaxRows(0);  // parallelism authorized, which is the default.

Thus on my jdbc basic program if I add :
statement. setMaxRows(100);  // No parallelism allowed (at least in Pg10)

Thanks to all who were kind enough to help.

Laurent

-----Message d'origine-----
De : Justin Pryzby [mailto:pryzby@telsasoft.com]
Envoyé : mercredi 17 avril 2019 15:57
À : DECHAMBE Laurent DTSI/DSI
Cc : Andreas Joseph Krogh; pgsql-performance@lists.postgresql.org
Objet : Re: Pg10 : Client Configuration for Parallelism ?

On Wed, Apr 17, 2019 at 09:51:02AM +0000, laurent.dechambe@orange.com wrote:
> <DBEAVER>
> 2019-04-17 11:30:42 CEST;35895;thedbuser;thedb;00000;LOG:  00000: execute <unnamed>: SELECT COUNT(1) FROM big_table
> 2019-04-17 11:30:42 CEST;35895;thedbuser;thedb;00000;LOCATION:  exec_execute_message, postgres.c:1959

"execute" means it's using the extended protocol.
https://www.postgresql.org/docs/11/protocol-flow.html#PROTOCOL-FLOW-EXT-QUERY

> <BASIC JDBC>
> 2019-04-17 11:31:20 CEST;37257;thedbuser;thedb;00000;LOG:  00000: execute <unnamed>: SELECT COUNT(1) FROM big_table
> 2019-04-17 11:31:20 CEST;37257;thedbuser;thedb;00000;LOCATION:  exec_execute_message, postgres.c:1959

Same.

> <PGADMIN4>
> 2019-04-17 11:32:56 CEST;37324;thedbuser;thedb;00000;LOG:  00000: statement: SELECT COUNT(1) FROM big_table;
> 2019-04-17 11:32:56 CEST;37324;thedbuser;thedb;00000;LOCATION:  exec_simple_query, postgres.c:940

This is a "simple query", not using the "extended protocol".

On Wed, Apr 17, 2019 at 11:26:07AM +0000, laurent.dechambe@orange.com wrote:
> There is something in documentation that says that there won't be parallelism if " The client sends an Execute
messagewith a non-zero fetch count." 
> I am not sure what this sentence means.

This is likely the cause of the difference.

Could you run wireshark to watch the protocol traffic ?

I think it'll show that dbeaver is retrieving a portion of the result set.

Justin


_________________________________________________________________________________________________________________________

Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.




В списке pgsql-performance по дате отправления:

Предыдущее
От: Justin Pryzby
Дата:
Сообщение: Re: Pg10 : Client Configuration for Parallelism ?
Следующее
От: Laurenz Albe
Дата:
Сообщение: Re: Pg10 : Client Configuration for Parallelism ?