Re: SELECT Query taking time WITH Sequence

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Daulat <daulat(dot)dba(at)gmail(dot)com>, pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: SELECT Query taking time WITH Sequence
Date: 2025-03-12 17:08:17
Message-ID: 2511f19763391f4a0080dcf744b9caf49917b519.camel@cybertec.at
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Wed, 2025-03-12 at 22:35 +0530, Daulat wrote:
> The SELECT query takes around 4 minutes to complete when fetching data from the tables
> using a sequence, but without the sequence, the same query takes only a few seconds."
> Anyone please help me with what I need to take care of.

Start with a useful problem report.

You cannot access a table using a sequence. Perhaps you are talking about a sequential scan.
What is the table definition, the query and its EXPLAIN (ANALYZE, BUFFERS) output?

Yours,
Laurenz Albe

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message David G. Johnston 2025-03-12 17:11:16 Re: SELECT Query taking time WITH Sequence
Previous Message Daulat 2025-03-12 17:05:35 SELECT Query taking time WITH Sequence