explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Pifo : with

Settings
# exclusive inclusive rows x rows loops node
1. 0.030 457.050 ↓ 4.0 4 1

Sort (cost=48,627.61..48,627.61 rows=1 width=738) (actual time=457.049..457.050 rows=4 loops=1)

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

CTE mddealer

3. 0.170 3.163 ↓ 3.2 353 1

Hash Join (cost=186.38..497.47 rows=110 width=6) (actual time=2.735..3.163 rows=353 loops=1)

  • Hash Cond: ((relation.from_organization_id_)::text = (mst.organization_id_)::text)
4. 1.137 1.137 ↓ 1.4 353 1

Seq Scan on cmm_party_relation relation (cost=0.00..308.04 rows=260 width=35) (actual time=0.867..1.137 rows=353 loops=1)

  • Filter: ((party_relation_type_id_)::text = 'C028DEALERUNITMAINDEALER'::text)
  • Rows Removed by Filter: 6343
5. 0.837 1.856 ↑ 1.0 3,513 1

Hash (cost=141.17..141.17 rows=3,617 width=42) (actual time=1.856..1.856 rows=3,513 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 260kB
6. 1.019 1.019 ↑ 1.0 3,513 1

Seq Scan on cmm_site_mst mst (cost=0.00..141.17 rows=3,617 width=42) (actual time=0.003..1.019 rows=3,513 loops=1)

7. 0.038 457.020 ↓ 4.0 4 1

Nested Loop (cost=4.98..48,130.13 rows=1 width=738) (actual time=7.744..457.020 rows=4 loops=1)

  • Join Filter: ((cmmsitemst.area_id_)::text = (cmmareamst.geography_id_)::text)
  • Rows Removed by Join Filter: 100
8. 0.012 456.962 ↓ 4.0 4 1

Nested Loop (cost=4.98..48,118.78 rows=1 width=258) (actual time=7.730..456.962 rows=4 loops=1)

9. 1.939 456.906 ↓ 4.0 4 1

Nested Loop (cost=4.56..48,118.19 rows=1 width=259) (actual time=7.716..456.906 rows=4 loops=1)

  • Join Filter: ((cmmorginfo.party_id_)::text = (cmmparty.party_id_)::text)
  • Rows Removed by Join Filter: 15844
10. 2.414 453.175 ↓ 4.0 4 1

Nested Loop (cost=4.56..47,954.95 rows=1 width=324) (actual time=7.027..453.175 rows=4 loops=1)

  • Join Filter: ((cmmregdoc.organization_id_)::text = (cmmorginfo.party_id_)::text)
  • Rows Removed by Join Filter: 15512
11. 0.000 448.993 ↓ 4.0 4 1

Nested Loop (cost=4.56..47,657.76 rows=1 width=272) (actual time=6.025..448.993 rows=4 loops=1)

12. 46.562 194.862 ↓ 9.8 51,472 1

Nested Loop (cost=4.00..27,121.71 rows=5,262 width=223) (actual time=3.691..194.862 rows=51,472 loops=1)

  • Join Filter: ((mddealer.site_code_)::text = (cmmregdoc.site_id_)::text)
13. 0.808 4.629 ↓ 3.2 353 1

Hash Join (cost=3.58..159.41 rows=110 width=140) (actual time=3.667..4.629 rows=353 loops=1)

  • Hash Cond: ((cmmsitemst.site_id_)::text = (mddealer.site_code_)::text)
14. 0.515 0.515 ↑ 1.0 3,513 1

Seq Scan on cmm_site_mst cmmsitemst (cost=0.00..141.17 rows=3,617 width=42) (actual time=0.005..0.515 rows=3,513 loops=1)

15. 0.073 3.306 ↓ 3.2 353 1

Hash (cost=2.20..2.20 rows=110 width=98) (actual time=3.306..3.306 rows=353 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
16. 3.233 3.233 ↓ 3.2 353 1

CTE Scan on mddealer (cost=0.00..2.20 rows=110 width=98) (actual time=2.737..3.233 rows=353 loops=1)

17. 143.671 143.671 ↓ 3.0 146 353

Index Scan using cmm_registration_doc_idx02 on cmm_registration_document cmmregdoc (cost=0.43..244.51 rows=48 width=194) (actual time=0.223..0.407 rows=146 loops=353)

  • Index Cond: ((site_id_)::text = (cmmsitemst.site_id_)::text)
  • Filter: (((request_faktur_date_)::text >= '20190101'::text) AND ((request_faktur_date_)::text <= '20190805'::text))
  • Rows Removed by Filter: 226
18. 257.360 257.360 ↓ 0.0 0 51,472

Index Scan using cmm_registration_document_dtl_idx01 on cmm_registration_document_dtl cmmregdocdtl (cost=0.56..3.89 rows=1 width=73) (actual time=0.005..0.005 rows=0 loops=51,472)

  • Index Cond: ((registration_document_id_)::text = (cmmregdoc.registration_document_id_)::text)
  • Filter: ((print_times_ > 1) AND ((document_type_)::text = 'C174FAKTUR'::text) AND ((status_)::text = 'C176WAITINGFORALLOCAPPROVE'::text))
  • Rows Removed by Filter: 2
19. 1.768 1.768 ↓ 1.0 3,879 4

Seq Scan on cmm_organization_info cmmorginfo (cost=0.00..248.75 rows=3,875 width=52) (actual time=0.002..0.442 rows=3,879 loops=4)

20. 1.792 1.792 ↑ 1.0 3,962 4

Seq Scan on cmm_party_info cmmparty (cost=0.00..113.66 rows=3,966 width=43) (actual time=0.003..0.448 rows=3,962 loops=4)

21. 0.044 0.044 ↑ 1.0 1 4

Index Scan using pk_product_add on cmm_product cmmpro (cost=0.42..0.58 rows=1 width=73) (actual time=0.010..0.011 rows=1 loops=4)

  • Index Cond: ((product_id_)::text = (cmmregdoc.product_id_)::text)
22. 0.020 0.020 ↑ 2.3 26 4

Seq Scan on cmm_area_mst cmmareamst (cost=0.00..10.60 rows=60 width=614) (actual time=0.003..0.005 rows=26 loops=4)

Planning time : 4.230 ms
Execution time : 457.276 ms