explain.depesz.com

A tool for finding a real cause for slow queries.

Result: Gmv

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 13412.970 32765.282 ↑ 104.6 1000000 1

Sort (cost=203264758.08..203526286.39 rows=104611325 width=672) (actual time=32233.563..32765.282 rows=1000000 loops=1)

  • Sort Key: tmp_ap_di.fs_party
  • Sort Method: external sort Disk: 339208kB
2. 4345.318 19352.312 ↑ 104.6 1000000 1

Merge Join (cost=1110470.14..2684870.00 rows=104611325 width=672) (actual time=14331.078..19352.312 rows=1000000 loops=1)

  • Merge Cond: ((cm_ledgeritem.salesteam)::text = (tmp_ap_di.ap_tril_gid)::text)
3. 13156.307 14071.737 ↑ 1.0 1000000 1

Sort (cost=1105457.98..1107968.82 rows=1004333 width=500) (actual time=13471.694..14071.737 rows=1000000 loops=1)

  • Sort Key: cm_ledgeritem.salesteam
  • Sort Method: external sort Disk: 275664kB
4. 915.430 915.430 ↑ 1.0 1000000 1

Seq Scan on cm_ledgeritem (cost=0.00..99075.00 rows=1004333 width=500) (actual time=0.009..915.430 rows=1000000 loops=1)

  • Filter: (fs_batchid = 1)
5. 109.480 935.257 ↓ 49.4 1029899 1

Materialize (cost=5012.15..5272.55 rows=20832 width=258) (actual time=707.158..935.257 rows=1029899 loops=1)

6. 814.610 825.777 ↓ 1.4 29900 1

Sort (cost=5012.15..5064.23 rows=20832 width=258) (actual time=707.153..825.777 rows=29900 loops=1)

  • Sort Key: tmp_ap_di.ap_tril_gid
  • Sort Method: external merge Disk: 4808kB
7. 11.167 11.167 ↓ 2.2 45351 1

Seq Scan on tmp_ap_di (cost=0.00..952.32 rows=20832 width=258) (actual time=0.013..11.167 rows=45351 loops=1)