Re: LISTEN NOTIFY sometimes huge delay

2022-04-28 Thread Tom Lane
"Peter Eser HEUFT [Germany]" writes: > I have a table with time series data and on this table a trigger for > notifies: > containers_notify AFTER INSERT ON containers FOR EACH ROW EXECUTE > PROCEDURE containers_notify('containers_notify_collector') > and the function does: > PERFORM pg_notify(CA

LISTEN NOTIFY sometimes huge delay

2022-04-28 Thread Peter Eser HEUFT [Germany]
Hi all, I have a table with time series data and on this table a trigger for notifies: containers_notify AFTER INSERT ON containers FOR EACH ROW EXECUTE PROCEDURE containers_notify('containers_notify_collector') and the function does: PERFORM pg_notify(CAST(TG_ARGV[0] AS text), row_to_json

Re: Performance differential when 0 values present vs when 1 values present. Planner return 52k rows when 0 expected.

2022-04-28 Thread Emil Iggland
> I don't think that index can be used for your original query. It could > only be used if "channel" is unique in "valueseries" and you'd written > the query as: Thanks! That explanation I can understand, now I know how to avoid this in future. > I guess "channel" must not be the primary key t