Slow ext'd query via client native implementation vs. libpq & simple psql

2020-03-11 Thread Richard Michael
Hello, On PG 12.2, I am analyzing a performance problem when using a client (Elixir/postgrex) querying via the extended query protocol. I am comparing with psql and a C program. Logs for all three follow this short explanation. The query is trivial: `SELECT [cols] FROM t WHERE id = X` on a 65K

Re: Slow ext'd query via client native implementation vs. libpq & simple psql

2020-03-11 Thread Justin Pryzby
On Wed, Mar 11, 2020 at 03:31:48PM -0400, Richard Michael wrote: > The query is trivial: `SELECT [cols] FROM t WHERE id = X` on a 65K row > table. > The Elixir client executes this as an extended query in >500-700ms, very > slow. > If relevant, the client does not use libpq, it is a native impleme

Re: Slow ext'd query via client native implementation vs. libpq & simple psql

2020-03-11 Thread Tom Lane
Richard Michael writes: > On PG 12.2, I am analyzing a performance problem when using a client > (Elixir/postgrex) querying via the extended query protocol. I am comparing > with > psql and a C program. Logs for all three follow this short explanation. Hmm, your auto-explain log entries show al