I speculate that I am in the good old problem .. of a very slow plan of NOT IN
(We used to convert it to NOT EXISTS in V8).
Is this planner issue still in V9? Has the planner fixed for it in V10?
Thanks
Danny
2021-04-09 08:00:08.692 IDTERROR: canceling statement due to statement timeout
2021-04-09 08:00:08.692 IDTCONTEXT: PL/pgSQL function
orhpans_active_clean_table(character varying,integer) line 42 at FETCH
PL/pgSQL function orhpans_active_removal() line 31 at assignment
PL/pgSQL fu
stmt := 'select count(*) from ' || table_name;
open C1 for execute stmt;
fetch C1 into rc;
close C1;
if (debug_level = 1) then
if rc > 0 then
perform diag_print(func_name,format('Counted %s records in table
%s',rc,table_name) );
else
perform diag_print