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. 4859.301 26183.003 ↑ 1.1 1000000 1

Merge Join (cost=991545.77..1008695.35 rows=1128213 width=446) (actual time=15631.556..26183.003 rows=1000000 loops=1)

  • Merge Cond: ((fs_debtitem.fs_party)::text = (fs_agrperson.fs_party)::text)
2. 836.713 1447.022 ↑ 1.8 28134 1

Sort (cost=93659.96..93789.51 rows=51822 width=66) (actual time=1303.427..1447.022 rows=28134 loops=1)

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

Seq Scan on fs_debtitem (cost=0.00..87473.96 rows=51822 width=66) (actual time=0.031..610.309 rows=45351 loops=1)

  • Filter: (fs_annualize = 0)
4. 3699.544 19876.680 ↓ 1.0 1000000 1

Materialize (cost=897885.24..910226.91 rows=987333 width=380) (actual time=14114.352..19876.680 rows=1000000 loops=1)

5. 8000.017 16177.136 ↓ 1.0 1000000 1

Sort (cost=897885.24..900353.58 rows=987333 width=380) (actual time=14114.343..16177.136 rows=1000000 loops=1)

  • Sort Key: fs_agrperson.fs_party
  • Sort Method: external sort Disk: 312664kB
6. 5278.611 8177.119 ↓ 1.0 1000000 1

Hash Join (cost=2890.40..283253.56 rows=987333 width=380) (actual time=5341.210..8177.119 rows=1000000 loops=1)

  • Hash Cond: ((cm_ledgeritem.salesteam)::text = (fs_agrperson.tril_gid)::text)
7. 2691.350 2691.350 ↓ 1.0 1000000 1

Seq Scan on cm_ledgeritem (cost=0.00..173151.00 rows=987333 width=347) (actual time=200.733..2691.350 rows=1000000 loops=1)

  • Filter: (fs_batchid = 1)
8. 94.362 207.158 ↑ 1.0 45351 1

Hash (cost=1791.51..1791.51 rows=45351 width=66) (actual time=207.158..207.158 rows=45351 loops=1)

9. 112.796 112.796 ↑ 1.0 45351 1

Seq Scan on fs_agrperson (cost=0.00..1791.51 rows=45351 width=66) (actual time=0.011..112.796 rows=45351 loops=1)