explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FUwk : V2

Settings
# exclusive inclusive rows x rows loops node
1. 0.017 153.498 ↓ 3.0 3 1

Sort (cost=70,925.85..70,925.85 rows=1 width=1,978) (actual time=153.498..153.498 rows=3 loops=1)

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

CTE mddealer

3. 0.195 5.732 ↓ 3.1 560 1

Hash Join (cost=628.42..863.87 rows=183 width=55) (actual time=4.643..5.732 rows=560 loops=1)

  • Hash Cond: ((mst.area_id_)::text = (cmmareamst.geography_id_)::text)
4. 0.188 5.515 ↓ 3.1 560 1

Hash Join (cost=626.83..859.77 rows=183 width=81) (actual time=4.601..5.515 rows=560 loops=1)

  • Hash Cond: ((relation.to_organization_id_)::text = (mdsite.organization_id_)::text)
5. 0.307 3.001 ↓ 2.8 560 1

Hash Join (cost=313.62..543.47 rows=202 width=93) (actual time=2.262..3.001 rows=560 loops=1)

  • Hash Cond: ((relation.from_organization_id_)::text = (mst.organization_id_)::text)
6. 0.477 0.477 ↓ 1.2 560 1

Index Only Scan using cmm_party_relation_idx01 on cmm_party_relation relation (cost=0.41..225.36 rows=460 width=71) (actual time=0.028..0.477 rows=560 loops=1)

  • Index Cond: ((site_id_ = '6548'::text) AND (party_relation_type_id_ = 'C028DEALERUNITMAINDEALER'::text))
  • Heap Fetches: 560
7. 1.203 2.217 ↑ 1.0 3,565 1

Hash (cost=268.65..268.65 rows=3,565 width=95) (actual time=2.217..2.217 rows=3,565 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 451kB
8. 1.014 1.014 ↑ 1.0 3,565 1

Seq Scan on cmm_site_mst mst (cost=0.00..268.65 rows=3,565 width=95) (actual time=0.002..1.014 rows=3,565 loops=1)

9. 1.090 2.326 ↑ 1.0 3,565 1

Hash (cost=268.65..268.65 rows=3,565 width=58) (actual time=2.326..2.326 rows=3,565 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 322kB
10. 1.236 1.236 ↑ 1.0 3,565 1

Seq Scan on cmm_site_mst mdsite (cost=0.00..268.65 rows=3,565 width=58) (actual time=0.003..1.236 rows=3,565 loops=1)

11. 0.012 0.022 ↑ 1.0 26 1

Hash (cost=1.26..1.26 rows=26 width=48) (actual time=0.022..0.022 rows=26 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 3kB
12. 0.010 0.010 ↑ 1.0 26 1

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

13. 0.015 153.481 ↓ 3.0 3 1

Nested Loop (cost=1.40..70,061.97 rows=1 width=1,978) (actual time=148.242..153.481 rows=3 loops=1)

14. 0.202 153.439 ↓ 3.0 3 1

Nested Loop (cost=0.99..70,061.37 rows=1 width=1,980) (actual time=148.221..153.439 rows=3 loops=1)

  • Join Filter: ((cmmregdoc.site_id_)::text = (mddealer.customercode)::text)
  • Rows Removed by Join Filter: 1677
15. 0.082 147.084 ↓ 3.0 3 1

Nested Loop (cost=0.99..70,055.42 rows=1 width=243) (actual time=143.505..147.084 rows=3 loops=1)

16. 146.636 146.636 ↓ 61.0 61 1

Index Scan using faktur_nik_document_01 on cmm_faktur_nik_document fk (cost=0.43..70,050.83 rows=1 width=110) (actual time=143.450..146.636 rows=61 loops=1)

  • Index Cond: ((status_)::text = 'C176WAITINGFORALLOCAPPROVE'::text)
17. 0.366 0.366 ↓ 0.0 0 61

Index Scan using cmm_registration_document_pkey on cmm_registration_document cmmregdoc (cost=0.56..4.58 rows=1 width=163) (actual time=0.006..0.006 rows=0 loops=61)

  • 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. 6.153 6.153 ↓ 3.1 560 3

CTE Scan on mddealer (cost=0.00..3.66 rows=183 width=1,744) (actual time=1.549..2.051 rows=560 loops=3)

19. 0.027 0.027 ↑ 1.0 1 3

Index Scan using pk_product on cmm_product cmmpro (cost=0.42..0.58 rows=1 width=72) (actual time=0.009..0.009 rows=1 loops=3)

  • Index Cond: ((product_id_)::text = (cmmregdoc.product_id_)::text)
Planning time : 1.324 ms
Execution time : 153.654 ms