explain.depesz.com

A tool for finding a real cause for slow queries.

Result: Ztq

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 4,859.301 26,183.003 ↑ 1.1 1,000,000 1

Merge Join (cost=991,545.77..1,008,695.35 rows=1,128,213 width=446) (actual time=15,631.556..26,183.003 rows=1,000,000 loops=1)

  • Merge Cond: ((fs_debtitem.fs_party)::text = (fs_agrperson.fs_party)::text)
2. 836.713 1,447.022 ↑ 1.8 28,134 1

Sort (cost=93,659.96..93,789.51 rows=51,822 width=66) (actual time=1,303.427..1,447.022 rows=28,134 loops=1)

  • Sort Key: fs_debtitem.fs_party
  • Sort Method: external merge Disk: 3616kB
3. 610.309 610.309 ↑ 1.1 45,351 1

Seq Scan on fs_debtitem (cost=0.00..87,473.96 rows=51,822 width=66) (actual time=0.031..610.309 rows=45,351 loops=1)

  • Filter: (fs_annualize = 0)
4. 3,699.544 19,876.680 ↓ 1.0 1,000,000 1

Materialize (cost=897,885.24..910,226.91 rows=987,333 width=380) (actual time=14,114.352..19,876.680 rows=1,000,000 loops=1)

5. 8,000.017 16,177.136 ↓ 1.0 1,000,000 1

Sort (cost=897,885.24..900,353.58 rows=987,333 width=380) (actual time=14,114.343..16,177.136 rows=1,000,000 loops=1)

  • Sort Key: fs_agrperson.fs_party
  • Sort Method: external sort Disk: 312664kB
6. 5,278.611 8,177.119 ↓ 1.0 1,000,000 1

Hash Join (cost=2,890.40..283,253.56 rows=987,333 width=380) (actual time=5,341.210..8,177.119 rows=1,000,000 loops=1)

  • Hash Cond: ((cm_ledgeritem.salesteam)::text = (fs_agrperson.tril_gid)::text)
7. 2,691.350 2,691.350 ↓ 1.0 1,000,000 1

Seq Scan on cm_ledgeritem (cost=0.00..173,151.00 rows=987,333 width=347) (actual time=200.733..2,691.350 rows=1,000,000 loops=1)

  • Filter: (fs_batchid = 1)
8. 94.362 207.158 ↑ 1.0 45,351 1

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

9. 112.796 112.796 ↑ 1.0 45,351 1

Seq Scan on fs_agrperson (cost=0.00..1,791.51 rows=45,351 width=66) (actual time=0.011..112.796 rows=45,351 loops=1)