explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hbBD : v11

Settings
# exclusive inclusive rows x rows loops node
1. 0.015 124.931 ↑ 1.0 1 1

Sort (cost=106,713.84..106,713.85 rows=1 width=753) (actual time=124.931..124.931 rows=1 loops=1)

  • Sort Key: cmmparty.party_code_, cmmregdoc.frame_no_
  • Sort Method: quicksort Memory: 25kB
2.          

CTE mddealer

3. 0.220 2.932 ↓ 2.2 614 1

Hash Join (cost=199.91..252.41 rows=277 width=522) (actual time=1.979..2.932 rows=614 loops=1)

  • Hash Cond: ((mst.area_id_)::text = (cmmareamst.geography_id_)::text)
4. 0.377 2.691 ↓ 2.2 614 1

Hash Join (cost=188.56..237.25 rows=277 width=42) (actual time=1.937..2.691 rows=614 loops=1)

  • Hash Cond: ((relation.from_organization_id_)::text = (mst.organization_id_)::text)
5. 0.459 0.459 ↓ 1.1 614 1

Index Only Scan using cmm_party_relation_idx01 on cmm_party_relation relation (cost=0.41..41.99 rows=579 width=36) (actual time=0.066..0.459 rows=614 loops=1)

  • Index Cond: ((site_id_ = '6548'::text) AND (party_relation_type_id_ = 'C028DEALERUNITMAINDEALER'::text))
  • Heap Fetches: 98
6. 0.772 1.855 ↑ 1.0 3,528 1

Hash (cost=142.51..142.51 rows=3,651 width=78) (actual time=1.855..1.855 rows=3,528 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 389kB
7. 1.083 1.083 ↑ 1.0 3,528 1

Seq Scan on cmm_site_mst mst (cost=0.00..142.51 rows=3,651 width=78) (actual time=0.006..1.083 rows=3,528 loops=1)

8. 0.011 0.021 ↑ 2.3 26 1

Hash (cost=10.60..10.60 rows=60 width=614) (actual time=0.021..0.021 rows=26 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 3kB
9. 0.010 0.010 ↑ 2.3 26 1

Seq Scan on cmm_area_mst cmmareamst (cost=0.00..10.60 rows=60 width=614) (actual time=0.006..0.010 rows=26 loops=1)

10. 0.008 124.916 ↑ 1.0 1 1

Nested Loop (cost=1.40..106,461.43 rows=1 width=753) (actual time=123.183..124.916 rows=1 loops=1)

11. 0.422 124.894 ↑ 1.0 1 1

Nested Loop (cost=0.99..106,456.98 rows=1 width=754) (actual time=123.162..124.894 rows=1 loops=1)

  • Join Filter: ((cmmorginfo.party_id_)::text = (cmmparty.party_id_)::text)
  • Rows Removed by Join Filter: 3976
12. 0.537 123.996 ↑ 1.0 1 1

Nested Loop (cost=0.99..106,291.53 rows=1 width=819) (actual time=122.280..123.996 rows=1 loops=1)

  • Join Filter: ((cmmregdoc.organization_id_)::text = (cmmorginfo.party_id_)::text)
  • Rows Removed by Join Filter: 3893
13. 0.088 122.940 ↑ 1.0 1 1

Nested Loop (cost=0.99..105,994.34 rows=1 width=767) (actual time=122.265..122.940 rows=1 loops=1)

  • Join Filter: ((cmmregdoc.site_id_)::text = (mddealer.site_code_)::text)
  • Rows Removed by Join Filter: 613
14. 0.022 119.716 ↑ 1.0 1 1

Nested Loop (cost=0.99..105,985.34 rows=1 width=258) (actual time=119.534..119.716 rows=1 loops=1)

15. 119.577 119.577 ↓ 9.0 9 1

Index Scan using faktur_nik_document_01 on cmm_faktur_nik_document fk (cost=0.56..105,980.87 rows=1 width=88) (actual time=16.336..119.577 rows=9 loops=1)

  • Index Cond: ((status_)::text = 'C176WAITINGFORALLOCAPPROVE'::text)
  • Filter: (faktur_print_times_ > 1)
16. 0.117 0.117 ↓ 0.0 0 9

Index Scan using cmm_registration_document_pkey on cmm_registration_document cmmregdoc (cost=0.43..4.46 rows=1 width=194) (actual time=0.013..0.013 rows=0 loops=9)

  • Index Cond: ((registration_document_id_)::text = (fk.registration_document_id_)::text)
  • Filter: (((request_faktur_date_)::text >= '20191005'::text) AND ((request_faktur_date_)::text <= '20191105'::text))
  • Rows Removed by Filter: 1
17. 3.136 3.136 ↓ 2.2 614 1

CTE Scan on mddealer (cost=0.00..5.54 rows=277 width=614) (actual time=1.982..3.136 rows=614 loops=1)

18. 0.519 0.519 ↓ 1.0 3,894 1

Seq Scan on cmm_organization_info cmmorginfo (cost=0.00..248.75 rows=3,875 width=52) (actual time=0.004..0.519 rows=3,894 loops=1)

19. 0.476 0.476 ↑ 1.0 3,977 1

Seq Scan on cmm_party_info cmmparty (cost=0.00..115.20 rows=4,020 width=43) (actual time=0.003..0.476 rows=3,977 loops=1)

20. 0.014 0.014 ↑ 1.0 1 1

Index Scan using pk_product_add on cmm_product cmmpro (cost=0.42..4.44 rows=1 width=73) (actual time=0.013..0.014 rows=1 loops=1)

  • Index Cond: ((product_id_)::text = (cmmregdoc.product_id_)::text)
Planning time : 1.823 ms
Execution time : 125.099 ms