Re: Pg10 : Client Configuration for Parallelism ? - Mailing list pgsql-performance

From Laurenz Albe
Subject Re: Pg10 : Client Configuration for Parallelism ?
Date
Msg-id 86bd000a7270215b5322d73fdac4ab2c8aa4f520.camel@cybertec.at
Whole thread Raw
In response to RE: Pg10 : Client Configuration for Parallelism ?  (<laurent.dechambe@orange.com>)
List pgsql-performance
laurent.dechambe@orange.com wrote:
> There is something in documentation that says that there won't be parallelism
> if " The client sends an Execute message with a non-zero fetch count."
> I am not sure what this sentence means.

The JDBC driver sends an "Execute" message to the server.
https://www.postgresql.org/docs/current/protocol-message-formats.html says:

Execute (F)

    Byte1('E')
        Identifies the message as an Execute command.
    Int32
        Length of message contents in bytes, including self.
    String
        The name of the portal to execute (an empty string selects the unnamed portal).
    Int32
        Maximum number of rows to return, if portal contains a query that returns rows
        (ignored otherwise). Zero denotes “no limit”.

If you use setMaxRows non-zero, that number is sent as the "maximum number of rows".

Parallelism currently cannot be used if there is a limit on the row count.
Imagine you want ten rows and already have nine, now if two workers are busy
calculating the next row, there is no good way to stop one of them when the other
returns a row.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




pgsql-performance by date:

Previous
From:
Date:
Subject: RE: Pg10 : Client Configuration for Parallelism ?
Next
From: Bruce Momjian
Date:
Subject: Re: Block / Page Size Optimization