explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wIUX : product1

Settings
# exclusive inclusive rows x rows loops node
1. 0.053 212.851 ↓ 3.0 3 1

Sort (cost=70,875.96..70,875.97 rows=1 width=769) (actual time=212.851..212.851 rows=3 loops=1)

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

CTE mddealer

3. 0.286 5.852 ↓ 2.8 560 1

Hash Join (cost=315.20..547.83 rows=202 width=17) (actual time=4.459..5.852 rows=560 loops=1)

  • Hash Cond: ((mst.area_id_)::text = (cmmareamst.geography_id_)::text)
4. 0.310 5.546 ↓ 2.8 560 1

Hash Join (cost=313.62..543.47 rows=202 width=43) (actual time=4.419..5.546 rows=560 loops=1)

  • Hash Cond: ((relation.from_organization_id_)::text = (mst.organization_id_)::text)
5. 0.927 0.927 ↓ 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=37) (actual time=0.092..0.927 rows=560 loops=1)

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

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

  • Buckets: 1024 Batches: 1 Memory Usage: 393kB
7. 2.870 2.870 ↑ 1.0 3,565 1

Seq Scan on cmm_site_mst mst (cost=0.00..268.65 rows=3,565 width=79) (actual time=0.014..2.870 rows=3,565 loops=1)

8. 0.012 0.020 ↑ 1.0 26 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 3kB
9. 0.008 0.008 ↑ 1.0 26 1

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

10. 0.023 212.798 ↓ 3.0 3 1

Nested Loop (cost=1.40..70,328.13 rows=1 width=769) (actual time=198.761..212.798 rows=3 loops=1)

11. 2.247 212.679 ↓ 3.0 3 1

Nested Loop (cost=0.99..70,327.53 rows=1 width=771) (actual time=198.702..212.679 rows=3 loops=1)

  • Join Filter: ((cmmorginfo.party_id_)::text = (cmmparty.party_id_)::text)
  • Rows Removed by Join Filter: 12783
12. 2.080 208.299 ↓ 3.0 3 1

Nested Loop (cost=0.99..70,147.02 rows=1 width=836) (actual time=197.468..208.299 rows=3 loops=1)

  • Join Filter: ((cmmregdoc.organization_id_)::text = (cmmorginfo.party_id_)::text)
  • Rows Removed by Join Filter: 11793
13. 0.240 203.612 ↓ 3.0 3 1

Nested Loop (cost=0.99..69,844.57 rows=1 width=784) (actual time=195.457..203.612 rows=3 loops=1)

  • Join Filter: ((cmmregdoc.site_id_)::text = (mddealer.site_code_)::text)
  • Rows Removed by Join Filter: 1677
14. 0.068 197.153 ↓ 3.0 3 1

Nested Loop (cost=0.99..69,838.00 rows=1 width=275) (actual time=190.854..197.153 rows=3 loops=1)

15. 196.414 196.414 ↓ 61.0 61 1

Index Scan using faktur_nik_document_01 on cmm_faktur_nik_document fk (cost=0.43..69,833.41 rows=1 width=106) (actual time=190.781..196.414 rows=61 loops=1)

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

Index Scan using cmm_registration_document_pkey on cmm_registration_document cmmregdoc (cost=0.56..4.58 rows=1 width=199) (actual time=0.011..0.011 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
17. 6.219 6.219 ↓ 2.8 560 3

CTE Scan on mddealer (cost=0.00..4.04 rows=202 width=614) (actual time=1.487..2.073 rows=560 loops=3)

18. 2.607 2.607 ↓ 1.0 3,932 3

Seq Scan on cmm_organization_info cmmorginfo (cost=0.00..253.31 rows=3,931 width=52) (actual time=0.007..0.869 rows=3,932 loops=3)

19. 2.133 2.133 ↓ 1.0 4,262 3

Seq Scan on cmm_party_info cmmparty (cost=0.00..127.45 rows=4,245 width=43) (actual time=0.004..0.711 rows=4,262 loops=3)

20. 0.096 0.096 ↑ 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.031..0.032 rows=1 loops=3)

  • Index Cond: ((product_id_)::text = (cmmregdoc.product_id_)::text)
Planning time : 5.013 ms
Execution time : 213.059 ms