explain.depesz.com

A tool for finding a real cause for slow queries.

Result: omN

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 4,244.435 19,802.139 ↓ 1.0 1,000,000 1

Merge Join (cost=1,398,900.98..1,419,034.34 rows=980,110 width=599) (actual time=15,145.778..19,802.139 rows=1,000,000 loops=1)

  • Merge Cond: ((fs_agrperson.fs_party)::text = (fs_debtitem.fs_party)::text)
2. 12,625.424 14,234.234 ↓ 1.0 1,000,000 1

Sort (cost=1,306,165.01..1,308,661.03 rows=998,405 width=533) (actual time=13,864.657..14,234.234 rows=1,000,000 loops=1)

  • Sort Key: fs_agrperson.fs_party
  • Sort Method: external sort Disk: 306952kB
3. 587.471 1,608.810 ↓ 1.0 1,000,000 1

Hash Join (cost=2,886.40..251,163.62 rows=998,405 width=533) (actual time=64.913..1,608.810 rows=1,000,000 loops=1)

  • Hash Cond: ((cm_ledgeritem.salesteam)::text = (fs_agrperson.tril_gid)::text)
4. 956.457 956.457 ↓ 1.0 1,000,000 1

Seq Scan on cm_ledgeritem (cost=0.00..99,075.12 rows=998,405 width=500) (actual time=0.010..956.457 rows=1,000,000 loops=1)

  • Filter: (fs_batchid = 1)
5. 23.830 64.882 ↑ 1.0 45,351 1

Hash (cost=1,787.51..1,787.51 rows=45,351 width=66) (actual time=64.882..64.882 rows=45,351 loops=1)

6. 41.052 41.052 ↑ 1.0 45,351 1

Seq Scan on fs_agrperson (cost=0.00..1,787.51 rows=45,351 width=66) (actual time=0.018..41.052 rows=45,351 loops=1)

7. 84.663 1,323.470 ↓ 23.3 1,038,059 1

Materialize (cost=92,733.09..93,289.59 rows=44,520 width=66) (actual time=1,087.679..1,323.470 rows=1,038,059 loops=1)

8. 845.809 1,238.807 ↑ 1.2 38,060 1

Sort (cost=92,733.09..92,844.39 rows=44,520 width=66) (actual time=1,087.676..1,238.807 rows=38,060 loops=1)

  • Sort Key: fs_debtitem.fs_party
  • Sort Method: external merge Disk: 3344kB
9. 392.998 392.998 ↓ 1.0 45,351 1

Seq Scan on fs_debtitem (cost=0.00..87,468.66 rows=44,520 width=66) (actual time=64.710..392.998 rows=45,351 loops=1)

  • Filter: (fs_annualize = 0)