Re: Query hangs (and then timeout) after using COPY to import data

From: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
To: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Query hangs (and then timeout) after using COPY to import data
Date: 2024-02-11 23:12:44
Message-ID: CANzqJaANOyfYP-hdwRbT6aLUVL=jBTWmVHo18y_8cuh92hm_zQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Feb 11, 2024 at 4:41 PM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
wrote:

> On 2/11/24 13:37, steott(at)gmail(dot)com wrote:
>
[snip]

> >
> > The same query, executed from pgAdmin, returns the result in less than a
> > second (even if it’s executed while the query from my app is running).
> >
> > (actually the result are 0 record, but it’s correct: the query it’s just
> > a validation that there are no records in that query)
>
[snip]

> > Do you have any suggestions to solve this problem?
> >
>
> Run ANALYZE on the tables/database.
>

If ANALYZE was the cure, why does it successfully run from PgAdmin?

In response to

Browse pgsql-general by date

  From Date Subject
Next Message steott 2024-02-11 23:13:40 RE: Query hangs (and then timeout) after using COPY to import data
Previous Message Peter J. Holzer 2024-02-11 22:22:30 Re: How to do faster DML