Marc Cousin <mcousin@xxxxxxxx> writes: > [ can't cancel this query ] > Index Scan using file_jpfid_idx on file (cost=0.00..7327212.07 rows=2128 > width=104) > Index Cond: (pathid = 120) > "file_jpfid_idx" btree (jobid, pathid, filenameid) Hmm ... is it likely that index entries with pathid = 120 are *very* few and far between in jobid order? It looks like we have no CHECK_FOR_INTERRUPTS calls inside the loop in _bt_next(), which is probably a mistake ... regards, tom lane -- Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin