Thread: SELECT Query taking time WITH Sequence

SELECT Query taking time WITH Sequence

From
Daulat
Date:
Hi Team,

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.

Thanks,


Re: SELECT Query taking time WITH Sequence

From
Laurenz Albe
Date:
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



Re: SELECT Query taking time WITH Sequence

From
"David G. Johnston"
Date:
On Wed, Mar 12, 2025 at 10:05 AM Daulat <daulat.dba@gmail.com> wrote:
Anyone please help me with what I need to take care of.



David J.