Re: Bad perf when using DECLARE CURSOR on big table - Mailing list pgsql-performance

From Tom Lane
Subject Re: Bad perf when using DECLARE CURSOR on big table
Date
Msg-id 4008327.1742224977@sss.pgh.pa.us
Whole thread Raw
In response to Bad perf when using DECLARE CURSOR on big table  (kimaidou <kimaidou@gmail.com>)
Responses Re: Bad perf when using DECLARE CURSOR on big table
List pgsql-performance
kimaidou <kimaidou@gmail.com> writes:
> I have seen that this DECLARE has bad perf compared to a simple SQL query :

> Simple SQL query
> =====
> https://explain.dalibo.com/plan/042bc4dc2449adfe
> 96ms

> DECLARE CURSOR for the same query
> =====
> https://explain.dalibo.com/plan/bh83fc0db500a79g#
> 171 031 ms !!

Raising cursor_tuple_fraction would probably help this case.

            regards, tom lane



pgsql-performance by date:

Previous
From: kimaidou
Date:
Subject: Bad perf when using DECLARE CURSOR on big table
Next
From: Renan Alves Fonseca
Date:
Subject: Re: Bulk DML performance