pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ron Johnson <ronljohnsonjr@gmail.com>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Query hangs (and then timeout) after using COPY to import data
Date: Sun, 11 Feb 2024 18:43:58 -0500
Message-ID: <2077733.1707695038@sss.pgh.pa.us> (raw)
In-Reply-To: <CANzqJaDCm2VU83wfWprdr13EqaOQ=DpUCq_kuUkiv1wmOdms9w@mail.gmail.com>
References: <002401da5d32$8637c200$92a74600$@gmail.com>
	<98a7e782-96bc-4c55-a919-bda0d5d35f87@aklaver.com>
	<004301da5d3f$f3d0ef50$db72cdf0$@gmail.com>
	<CANzqJaDCm2VU83wfWprdr13EqaOQ=DpUCq_kuUkiv1wmOdms9w@mail.gmail.com>

Ron Johnson <ronljohnsonjr@gmail.com> writes:
> Since the query works in PgAdmin, but not in npgsql, the problem has to be
> somewhere in Npgsql.

I'm wondering if npgsql is executing the query as a cursor and that
is causing the planner to make a poor choice of plan.  There is a
bias towards fast-start plans if you use a cursor, and that doesn't
always work well :-(

			regards, tom lane





view thread (8+ messages)  latest in thread

Message-ID: <2077733.1707695038@sss.pgh.pa.us>
Permalink:  ../2077733.1707695038@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2077733.1707695038@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, ronljohnsonjr@gmail.com
  Subject: Re: Query hangs (and then timeout) after using COPY to import data
  In-Reply-To: <2077733.1707695038@sss.pgh.pa.us>
  References: <002401da5d32$8637c200$92a74600$@gmail.com> <98a7e782-96bc-4c55-a919-bda0d5d35f87@aklaver.com> <004301da5d3f$f3d0ef50$db72cdf0$@gmail.com> <CANzqJaDCm2VU83wfWprdr13EqaOQ=DpUCq_kuUkiv1wmOdms9w@mail.gmail.com> <2077733.1707695038@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox