We need to change
SELECT E.pkid, NNN.nodeid, NNN.nodeconfigids FROM expectedreports E INNER JOIN ( SELECT NN.nodejoinkey, NN.nodeid, NN.nodeconfigids FROM ( SELECT N.nodejoinkey, N.nodeid, N.nodeconfigids, generate_subscripts ( N.nodeconfigids, 1 ) AS v FROM expectedreportsnodes N ) AS NN WHERE NN.nodeconfigids [ v ] IN ( '-729463641', '-1360796549', '-1647020772', '-1069407658', '-169478327', '414076556', '-1160380758', '587719827', '2003792667', '-1527719623', '-2002282454', '-1391152750', '1775299637', '-327440080', '1438665908', '-1264048383', '902539539', '-1998333504', '548284150', '-1187765222', '538198140', '-1934245639', '963348761', '2141341279' ) ) AS NNN ON E.nodejoinkey = NNN.nodejoinkey;
to
EXPLAIN ANALYSE select
E.pkid, NNN.nodeid, NNN.nodeconfigids
from expectedreports E
inner join (
select N.nodejoinkey, N.nodeid, N.nodeconfigids
from expectedreportsnodes N
where (nodeconfigids && '{"-729463641", "-1360796549", "-1647020772", "-1069407658", "-169478327", "414076556", "-1160380758", "587719827", "2003792667",
"-1527719623", "-2002282454", "-1391152750", "1775299637", "-327440080", "1438665908", "-1264048383", "902539539", "-1998333504", "548284150", "-1187765222", "538198140",
"-1934245639", "963348761", "2141341279" }')
) as NNN
on E.nodejoinkey = NNN.nodejoinkey;
(replace the generate_subscript to the &&)