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

2020-03-12 Thread Justin Pryzby
On Thu, Mar 12, 2020 at 04:27:54PM -0400, Richard Michael wrote: > > psql can't do it, but pygres can do it since last year. > > Thank you for mentioning it. Do you mean this: > https://github.com/rogamba/pygres ? Ugh, no. I'm referring to PyGreSQL, which was at one point a part of the postgres

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

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