For the record,
Qlik uses the odbc driver with useDeclareFetch=1, hence the use of cursors.
By default, postgresql planner tries to optimize the execution plan for
retrieving 10℅ of the records when using a cursor. This can be controlled with
cursor_tuple_fraction parameter.
In my case,
Thanks Ganesh,
this gave me the select that is slow. It effectively looks like this:
begin; declare "SQL_CUR4" cursor with hold for select ...
then a bunch of:
fetch 10 in "SQL_CUR4"
then a commit
I also found this
article
Hi,
On Tue, May 18, 2021 at 6:22 PM Franck Routier (perso)
wrote:
> Hi,
>
> I am using postgresql 12.7 on Ubunut as a datawarehouse, that is then
> queried by QlikSense to produce business analytics.
>
> One of my dataloaders, that runs multiple queries, sometimes takes about
> 3 hours to feed
Hi,
I am using postgresql 12.7 on Ubunut as a datawarehouse, that is then
queried by QlikSense to produce business analytics.
One of my dataloaders, that runs multiple queries, sometimes takes about
3 hours to feed Qlik with the relevant records (about 10M records), but
sometimes goes crazy