explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CrMy : vvv

Settings
# exclusive inclusive rows x rows loops node
1. 0.009 118.612 ↑ 1.0 1 1

Sort (cost=106,444.09..106,444.09 rows=1 width=1,958) (actual time=118.612..118.612 rows=1 loops=1)

  • Sort Key: mddealer.customercode, cmmregdoc.frame_no_
  • Sort Method: quicksort Memory: 25kB
2.          

CTE mddealer

3. 0.198 5.320 ↓ 2.2 614 1

Hash Join (cost=388.05..445.35 rows=275 width=560) (actual time=4.349..5.320 rows=614 loops=1)

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

Hash Join (cost=376.70..430.22 rows=275 width=80) (actual time=4.312..5.102 rows=614 loops=1)

  • Hash Cond: ((relation.to_organization_id_)::text = (mdsite.organization_id_)::text)
5. 0.299 2.744 ↓ 2.2 614 1

Hash Join (cost=188.56..237.25 rows=277 width=92) (actual time=2.182..2.744 rows=614 loops=1)

  • Hash Cond: ((relation.from_organization_id_)::text = (mst.organization_id_)::text)
6. 0.302 0.302 ↓ 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=70) (actual time=0.015..0.302 rows=614 loops=1)

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

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

  • Buckets: 1024 Batches: 1 Memory Usage: 446kB
8. 0.869 0.869 ↑ 1.0 3,528 1

Seq Scan on cmm_site_mst mst (cost=0.00..142.51 rows=3,651 width=94) (actual time=0.003..0.869 rows=3,528 loops=1)

9. 1.055 2.121 ↑ 1.0 3,528 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 319kB
10. 1.066 1.066 ↑ 1.0 3,528 1

Seq Scan on cmm_site_mst mdsite (cost=0.00..142.51 rows=3,651 width=58) (actual time=0.006..1.066 rows=3,528 loops=1)

11. 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
12. 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.005..0.008 rows=26 loops=1)

13. 0.025 118.603 ↑ 1.0 1 1

Nested Loop (cost=1.40..105,998.72 rows=1 width=1,958) (actual time=117.985..118.603 rows=1 loops=1)

14. 0.089 118.566 ↑ 1.0 1 1

Nested Loop (cost=0.99..105,994.27 rows=1 width=1,959) (actual time=117.949..118.566 rows=1 loops=1)

  • Join Filter: ((cmmregdoc.site_id_)::text = (mddealer.customercode)::text)
  • Rows Removed by Join Filter: 613
15. 0.025 112.862 ↑ 1.0 1 1

Nested Loop (cost=0.99..105,985.33 rows=1 width=222) (actual time=112.716..112.862 rows=1 loops=1)

16. 112.729 112.729 ↓ 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.524..112.729 rows=9 loops=1)

  • Index Cond: ((status_)::text = 'C176WAITINGFORALLOCAPPROVE'::text)
17. 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=158) (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
18. 5.615 5.615 ↓ 2.2 614 1

CTE Scan on mddealer (cost=0.00..5.50 rows=275 width=1,744) (actual time=4.351..5.615 rows=614 loops=1)

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

  • Index Cond: ((product_id_)::text = (cmmregdoc.product_id_)::text)
Planning time : 1.220 ms
Execution time : 118.743 ms