explain.depesz.com

PostgreSQL's explain analyze made readable

Result: OCxg

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 45,437.108 ↑ 1.0 20 1

Limit (cost=25,321.44..25,321.49 rows=20 width=243) (actual time=45,437.103..45,437.108 rows=20 loops=1)

  • Output: po."NNPayoutOrder", po."CreateDate", po."MerchantDecisionDate", po."ConfirmDate", po."OrderAmount", po."MerchantOrderId", po."ErrorCode", po."ErrorMessage", os."Name", po."NNUser", u."UserID", c."Alpha3", c."ISONumber", coug."Name", coug."CountryCode", coug."Alpha2", coug."Alpha3", po."NNMerchant", merch."Name", po."NNProject", pr."Name", lang."Alpha2", po."NNPayGroup", pgr."ShortName", po."IPv4", po."IPv6
  • Buffers: shared hit=48,843,077 read=43 dirtied=1,313 written=1,140, local hit=10,740 dirtied=5,368 written=9,712
  • I/O Timings: read=40.098
2. 18.545 45,437.104 ↑ 11.7 20 1

Sort (cost=25,321.44..25,322.03 rows=233 width=243) (actual time=45,437.101..45,437.104 rows=20 loops=1)

  • Output: po."NNPayoutOrder", po."CreateDate", po."MerchantDecisionDate", po."ConfirmDate", po."OrderAmount", po."MerchantOrderId", po."ErrorCode", po."ErrorMessage", os."Name", po."NNUser", u."UserID", c."Alpha3", c."ISONumber", coug."Name", coug."CountryCode", coug."Alpha2", coug."Alpha3", po."NNMerchant", merch."Name", po."NNProject", pr."Name", lang."Alpha2", po."NNPayGroup", pgr."ShortName", po."IPv4", po."IPv6
  • Sort Key: po."NNPayoutOrder" DESC
  • Sort Method: top-N heapsort Memory: 33kB
  • Buffers: shared hit=48,843,077 read=43 dirtied=1,313 written=1,140, local hit=10,740 dirtied=5,368 written=9,712
  • I/O Timings: read=40.098
3. 15.559 45,418.559 ↓ 24.3 5,660 1

Hash Join (cost=2,766.83..25,315.24 rows=233 width=243) (actual time=44.371..45,418.559 rows=5,660 loops=1)

  • Output: po."NNPayoutOrder", po."CreateDate", po."MerchantDecisionDate", po."ConfirmDate", po."OrderAmount", po."MerchantOrderId", po."ErrorCode", po."ErrorMessage", os."Name", po."NNUser", u."UserID", c."Alpha3", c."ISONumber", coug."Name", coug."CountryCode", coug."Alpha2", coug."Alpha3", po."NNMerchant", merch."Name", po."NNProject", pr."Name", lang."Alpha2", po."NNPayGroup", pgr."ShortName", po."IPv4", po."IPv6
  • Inner Unique: true
  • Hash Cond: ((tran."GetPayoutOrderStatus"(po."NNOrderStatus", po."NNPayoutOrder")) = os."NNOrderStatus")
  • Buffers: shared hit=48,843,077 read=43 dirtied=1,313 written=1,140, local hit=10,740 dirtied=5,368 written=9,712
  • I/O Timings: read=40.098
4. 44,815.654 45,402.983 ↓ 1.2 5,660 1

Hash Join (cost=2,765.60..25,254.90 rows=4,662 width=738) (actual time=44.333..45,402.983 rows=5,660 loops=1)

  • Output: po."NNPayoutOrder", po."CreateDate", po."MerchantDecisionDate", po."ConfirmDate", po."OrderAmount", po."MerchantOrderId", po."ErrorCode", po."ErrorMessage", po."NNAggregatorMethod", tran."GetPayoutOrderStatus"(po."NNOrderStatus", po."NNPayoutOrder"), po."IPv4", po."IPv6", po."NNUser", u."UserID", NULL::integer, NULL::text, c."Alpha3", c."ISONumber", NULL::integer, coug."Name", coug."CountryCode", coug."Alpha2", coug."Alpha3", NULL::text, NULL::text, NULL::text, NULL::text, NULL::integer, NULL::text, NULL::text, NULL::text, NULL::text, NULL::text, NULL::text, NULL::text, NULL::text, po."NNMerchant", merch."Name", po."NNProject", pr."Name", NULL::integer, NULL::text, lang."Alpha2", po."NNPayGroup", pgr."ShortName", NULL::text
  • Inner Unique: true
  • Hash Cond: (po."NNPayGroup" = pgr."NNPayGroup")
  • Buffers: shared hit=48,843,073 read=43 dirtied=1,313 written=1,140, local hit=10,740 dirtied=5,368 written=9,712
  • I/O Timings: read=40.098
5. 7.781 587.260 ↓ 1.2 5,660 1

Hash Left Join (cost=2,756.85..24,068.10 rows=4,662 width=231) (actual time=36.328..587.260 rows=5,660 loops=1)

  • Output: po."NNPayoutOrder", po."CreateDate", po."MerchantDecisionDate", po."ConfirmDate", po."OrderAmount", po."MerchantOrderId", po."ErrorCode", po."ErrorMessage", po."NNAggregatorMethod", po."NNOrderStatus", po."IPv4", po."IPv6", po."NNUser", po."NNMerchant", po."NNProject", po."NNPayGroup", u."UserID", c."Alpha3", c."ISONumber", coug."Name", coug."CountryCode", coug."Alpha2", coug."Alpha3", merch."Name", pr."Name", lang."Alpha2
  • Inner Unique: true
  • Hash Cond: (po."NNLanguage" = lang."NNLanguage")
  • Buffers: shared hit=447,815 read=25
  • I/O Timings: read=17.056
6. 8.265 579.422 ↓ 1.2 5,660 1

Hash Join (cost=2,750.73..24,049.46 rows=4,662 width=232) (actual time=36.265..579.422 rows=5,660 loops=1)

  • Output: po."NNPayoutOrder", po."CreateDate", po."MerchantDecisionDate", po."ConfirmDate", po."OrderAmount", po."MerchantOrderId", po."ErrorCode", po."ErrorMessage", po."NNAggregatorMethod", po."NNOrderStatus", po."IPv4", po."IPv6", po."NNUser", po."NNMerchant", po."NNProject", po."NNPayGroup", po."NNLanguage", u."UserID", c."Alpha3", c."ISONumber", coug."Name", coug."CountryCode", coug."Alpha2", coug."Alpha3", merch."Name", pr."Name
  • Inner Unique: true
  • Hash Cond: (po."NNProject" = pr."NNProject")
  • Buffers: shared hit=447,813 read=25
  • I/O Timings: read=17.056
7. 9.353 571.146 ↓ 1.2 5,660 1

Hash Join (cost=2,749.19..24,033.53 rows=4,662 width=217) (actual time=36.247..571.146 rows=5,660 loops=1)

  • Output: po."NNPayoutOrder", po."CreateDate", po."MerchantDecisionDate", po."ConfirmDate", po."OrderAmount", po."MerchantOrderId", po."ErrorCode", po."ErrorMessage", po."NNAggregatorMethod", po."NNOrderStatus", po."IPv4", po."IPv6", po."NNUser", po."NNMerchant", po."NNProject", po."NNPayGroup", po."NNLanguage", u."UserID", c."Alpha3", c."ISONumber", coug."Name", coug."CountryCode", coug."Alpha2", coug."Alpha3", merch."Name
  • Inner Unique: true
  • Hash Cond: (po."NNMerchant" = merch."NNMerchant")
  • Buffers: shared hit=447,812 read=25
  • I/O Timings: read=17.056
8. 8.226 561.787 ↓ 1.2 5,660 1

Hash Left Join (cost=2,748.03..24,012.72 rows=4,662 width=205) (actual time=36.235..561.787 rows=5,660 loops=1)

  • Output: po."NNPayoutOrder", po."CreateDate", po."MerchantDecisionDate", po."ConfirmDate", po."OrderAmount", po."MerchantOrderId", po."ErrorCode", po."ErrorMessage", po."NNAggregatorMethod", po."NNOrderStatus", po."IPv4", po."IPv6", po."NNUser", po."NNMerchant", po."NNProject", po."NNPayGroup", po."NNLanguage", u."UserID", c."Alpha3", c."ISONumber", coug."Name", coug."CountryCode", coug."Alpha2", coug."Alpha3
  • Inner Unique: true
  • Hash Cond: (po."NNCountryGeo" = coug."NNCountry")
  • Buffers: shared hit=447,811 read=25
  • I/O Timings: read=17.056
9. 9.049 553.458 ↓ 1.2 5,660 1

Hash Left Join (cost=2,739.61..23,991.85 rows=4,662 width=187) (actual time=36.109..553.458 rows=5,660 loops=1)

  • Output: po."NNPayoutOrder", po."CreateDate", po."MerchantDecisionDate", po."ConfirmDate", po."OrderAmount", po."MerchantOrderId", po."ErrorCode", po."ErrorMessage", po."NNAggregatorMethod", po."NNOrderStatus", po."IPv4", po."IPv6", po."NNUser", po."NNMerchant", po."NNProject", po."NNPayGroup", po."NNCountryGeo", po."NNLanguage", u."UserID", c."Alpha3", c."ISONumber
  • Inner Unique: true
  • Hash Cond: (po."NNOrderCurrency" = c."NNCurrency")
  • Buffers: shared hit=447,808 read=25
  • I/O Timings: read=17.056
10. 125.330 544.345 ↓ 1.2 5,660 1

Merge Join (cost=2,733.72..23,973.42 rows=4,662 width=184) (actual time=36.031..544.345 rows=5,660 loops=1)

  • Output: po."NNPayoutOrder", po."CreateDate", po."MerchantDecisionDate", po."ConfirmDate", po."OrderAmount", po."MerchantOrderId", po."ErrorCode", po."ErrorMessage", po."NNAggregatorMethod", po."NNOrderStatus", po."IPv4", po."IPv6", po."NNUser", po."NNMerchant", po."NNProject", po."NNPayGroup", po."NNOrderCurrency", po."NNCountryGeo", po."NNLanguage", u."UserID
  • Merge Cond: (u."NNUser" = po."NNUser")
  • Buffers: shared hit=447,806 read=25
  • I/O Timings: read=17.056
11. 390.603 390.603 ↑ 1.0 1,104,533 1

Index Scan using "Users_NNUser_pkey" on gn."Users" u (cost=0.43..38,844.34 rows=1,106,677 width=16) (actual time=0.009..390.603 rows=1,104,533 loops=1)

  • Output: u."NNUser", u."UserID", u."NNProject
  • Buffers: shared hit=442,303 read=18
  • I/O Timings: read=0.216
12. 6.387 28.412 ↓ 1.2 5,660 1

Sort (cost=1,172.38..1,184.03 rows=4,662 width=180) (actual time=25.042..28.412 rows=5,660 loops=1)

  • Output: po."NNPayoutOrder", po."CreateDate", po."MerchantDecisionDate", po."ConfirmDate", po."OrderAmount", po."MerchantOrderId", po."ErrorCode", po."ErrorMessage", po."NNAggregatorMethod", po."NNOrderStatus", po."IPv4", po."IPv6", po."NNUser", po."NNMerchant", po."NNProject", po."NNPayGroup", po."NNOrderCurrency", po."NNCountryGeo", po."NNCountryReg", po."NNLanguage
  • Sort Key: po."NNUser
  • Sort Method: quicksort Memory: 1,017kB
  • Buffers: shared hit=5,503 read=7
  • I/O Timings: read=16.839
13. 22.025 22.025 ↓ 1.2 5,660 1

Index Scan using "PayoutOrders_202007_CreateDate_idx" on tran."PayoutOrders_202007" po (cost=0.42..888.31 rows=4,662 width=180) (actual time=7.339..22.025 rows=5,660 loops=1)

  • Output: po."NNPayoutOrder", po."CreateDate", po."MerchantDecisionDate", po."ConfirmDate", po."OrderAmount", po."MerchantOrderId", po."ErrorCode", po."ErrorMessage", po."NNAggregatorMethod", po."NNOrderStatus", po."IPv4", po."IPv6", po."NNUser", po."NNMerchant", po."NNProject", po."NNPayGroup", po."NNOrderCurrency", po."NNCountryGeo", po."NNCountryReg", po."NNLanguage
  • Index Cond: ((po."CreateDate" >= '2020-07-26 18:00:59'::timestamp without time zone) AND (po."CreateDate" <= '2020-07-26 23:59:59'::timestamp without time zone))
  • Buffers: shared hit=5,499 read=7
  • I/O Timings: read=16.839
14. 0.031 0.064 ↑ 1.0 173 1

Hash (cost=3.73..3.73 rows=173 width=11) (actual time=0.064..0.064 rows=173 loops=1)

  • Output: c."Alpha3", c."ISONumber", c."NNCurrency
  • Buckets: 1,024 Batches: 1 Memory Usage: 16kB
  • Buffers: shared hit=2
15. 0.033 0.033 ↑ 1.0 173 1

Seq Scan on dic."Currencies" c (cost=0.00..3.73 rows=173 width=11) (actual time=0.008..0.033 rows=173 loops=1)

  • Output: c."Alpha3", c."ISONumber", c."NNCurrency
  • Buffers: shared hit=2
16. 0.059 0.103 ↑ 1.0 241 1

Hash (cost=5.41..5.41 rows=241 width=26) (actual time=0.103..0.103 rows=241 loops=1)

  • Output: coug."Name", coug."CountryCode", coug."Alpha2", coug."Alpha3", coug."NNCountry
  • Buckets: 1,024 Batches: 1 Memory Usage: 23kB
  • Buffers: shared hit=3
17. 0.044 0.044 ↑ 1.0 241 1

Seq Scan on dic."Countries" coug (cost=0.00..5.41 rows=241 width=26) (actual time=0.005..0.044 rows=241 loops=1)

  • Output: coug."Name", coug."CountryCode", coug."Alpha2", coug."Alpha3", coug."NNCountry
  • Buffers: shared hit=3
18. 0.002 0.006 ↑ 1.0 7 1

Hash (cost=1.07..1.07 rows=7 width=16) (actual time=0.006..0.006 rows=7 loops=1)

  • Output: merch."Name", merch."NNMerchant
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
19. 0.004 0.004 ↑ 1.0 7 1

Seq Scan on gn."Merchants" merch (cost=0.00..1.07 rows=7 width=16) (actual time=0.002..0.004 rows=7 loops=1)

  • Output: merch."Name", merch."NNMerchant
  • Buffers: shared hit=1
20. 0.004 0.011 ↑ 1.0 24 1

Hash (cost=1.24..1.24 rows=24 width=19) (actual time=0.011..0.011 rows=24 loops=1)

  • Output: pr."Name", pr."NNProject
  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
  • Buffers: shared hit=1
21. 0.007 0.007 ↑ 1.0 24 1

Seq Scan on gn."Projects" pr (cost=0.00..1.24 rows=24 width=19) (actual time=0.003..0.007 rows=24 loops=1)

  • Output: pr."Name", pr."NNProject
  • Buffers: shared hit=1
22. 0.028 0.057 ↑ 1.0 183 1

Hash (cost=3.83..3.83 rows=183 width=7) (actual time=0.057..0.057 rows=183 loops=1)

  • Output: lang."Alpha2", lang."NNLanguage
  • Buckets: 1,024 Batches: 1 Memory Usage: 16kB
  • Buffers: shared hit=2
23. 0.029 0.029 ↑ 1.0 183 1

Seq Scan on dic."Languages" lang (cost=0.00..3.83 rows=183 width=7) (actual time=0.005..0.029 rows=183 loops=1)

  • Output: lang."Alpha2", lang."NNLanguage
  • Buffers: shared hit=2
24. 0.035 0.069 ↑ 1.0 167 1

Hash (cost=6.67..6.67 rows=167 width=15) (actual time=0.069..0.069 rows=167 loops=1)

  • Output: pgr."ShortName", pgr."NNPayGroup
  • Buckets: 1,024 Batches: 1 Memory Usage: 17kB
  • Buffers: shared hit=5
25. 0.034 0.034 ↑ 1.0 167 1

Seq Scan on dic."PayGroups" pgr (cost=0.00..6.67 rows=167 width=15) (actual time=0.003..0.034 rows=167 loops=1)

  • Output: pgr."ShortName", pgr."NNPayGroup
  • Buffers: shared hit=5
26. 0.004 0.017 ↑ 1.0 10 1

Hash (cost=1.10..1.10 rows=10 width=13) (actual time=0.017..0.017 rows=10 loops=1)

  • Output: os."Name", os."NNOrderStatus
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
27. 0.013 0.013 ↑ 1.0 10 1

Seq Scan on dic."OrderStatuses" os (cost=0.00..1.10 rows=10 width=13) (actual time=0.010..0.013 rows=10 loops=1)

  • Output: os."Name", os."NNOrderStatus
  • Buffers: shared hit=1
Planning time : 5.054 ms
Execution time : 45,437.388 ms