explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Jlqy : V12

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

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

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

CTE mddealer

3. 0.202 2.645 ↓ 2.2 614 1

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

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

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

  • Hash Cond: ((relation.from_organization_id_)::text = (mst.organization_id_)::text)
5. 0.316 0.316 ↓ 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.017..0.316 rows=614 loops=1)

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

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

  • Buckets: 1024 Batches: 1 Memory Usage: 389kB
7. 1.086 1.086 ↑ 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.004..1.086 rows=3,528 loops=1)

8. 0.012 0.020 ↑ 2.3 26 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 3kB
9. 0.008 0.008 ↑ 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.008 rows=26 loops=1)

10. 0.010 115.777 ↑ 1.0 1 1

Nested Loop (cost=1.40..106,461.42 rows=1 width=753) (actual time=114.185..115.777 rows=1 loops=1)

11. 0.412 115.754 ↑ 1.0 1 1

Nested Loop (cost=0.99..106,456.97 rows=1 width=754) (actual time=114.163..115.754 rows=1 loops=1)

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

Nested Loop (cost=0.99..106,291.52 rows=1 width=819) (actual time=113.287..114.862 rows=1 loops=1)

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

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

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

Nested Loop (cost=0.99..105,985.33 rows=1 width=258) (actual time=110.737..110.889 rows=1 loops=1)

15. 110.757 110.757 ↓ 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=14.578..110.757 rows=9 loops=1)

  • Index Cond: ((status_)::text = 'C176WAITINGFORALLOCAPPROVE'::text)
16. 0.108 0.108 ↓ 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.012..0.012 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. 2.847 2.847 ↓ 2.2 614 1

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

18. 0.481 0.481 ↓ 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.481 rows=3,894 loops=1)

19. 0.480 0.480 ↑ 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.004..0.480 rows=3,977 loops=1)

20. 0.013 0.013 ↑ 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.012..0.013 rows=1 loops=1)

  • Index Cond: ((product_id_)::text = (cmmregdoc.product_id_)::text)
Planning time : 1.728 ms
Execution time : 115.956 ms