explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Agdn

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 208,742.015 ↓ 15.8 1,013,768 1

Gather (cost=2,117.41..1,786,237.93 rows=64,156 width=16) (actual time=268.551..208,742.015 rows=1,013,768 loops=1)

  • Workers Planned: 2
  • Workers Launched: 1
2. 1,505.098 177,656.553 ↓ 19.0 506,884 2 / 2

Hash Left Join (cost=1,117.41..1,339,193.34 rows=26,732 width=31) (actual time=336.368..177,656.553 rows=506,884 loops=2)

  • Hash Cond: (cntr."CurrencyId" = curr."CurrencyId")
3. 1,651.736 176,150.939 ↓ 19.0 506,884 2 / 2

Hash Left Join (cost=1,111.29..1,339,115.44 rows=26,732 width=32) (actual time=335.830..176,150.939 rows=506,884 loops=2)

  • Hash Cond: (el."ExpenseLineCountryId" = cntr."CountryId")
4. 2,212.682 174,498.461 ↓ 19.0 506,884 2 / 2

Nested Loop (cost=1,102.35..1,339,035.22 rows=26,732 width=32) (actual time=334.979..174,498.461 rows=506,884 loops=2)

5. 13,473.783 28,959.467 ↓ 19.2 100,650 2 / 2

Hash Join (cost=1,101.79..484,375.13 rows=5,253 width=4) (actual time=242.197..28,959.467 rows=100,650 loops=2)

  • Hash Cond: (er."EntityId" = entity."CustomerId")
6. 15,484.474 15,484.474 ↓ 1.2 8,969,794 2 / 2

Parallel Seq Scan on "IneligibleExpenseReport" er (cost=0.00..463,647.70 rows=7,476,370 width=12) (actual time=0.058..15,484.474 rows=8,969,794 loops=2)

7. 0.279 1.210 ↑ 1.6 199 2 / 2

Hash (cost=1,097.77..1,097.77 rows=321 width=8) (actual time=1.209..1.210 rows=199 loops=2)

  • Buckets: 1,024 Batches: 1 Memory Usage: 16kB
8. 0.757 0.931 ↑ 1.6 199 2 / 2

Bitmap Heap Scan on "Customer" entity (cost=11.41..1,097.77 rows=321 width=8) (actual time=0.201..0.931 rows=199 loops=2)

  • Recheck Cond: (("CustomerId" = 70,283,727) OR ("HeadQuarterId" = 70,283,727))
  • Heap Blocks: exact=43
9. 0.005 0.174 ↓ 0.0 0 2 / 2

BitmapOr (cost=11.41..11.41 rows=321 width=0) (actual time=0.173..0.174 rows=0 loops=2)

10. 0.067 0.067 ↑ 1.0 1 2 / 2

Bitmap Index Scan on "CustomerId" (cost=0.00..4.43 rows=1 width=0) (actual time=0.066..0.067 rows=1 loops=2)

  • Index Cond: ("CustomerId" = 70,283,727)
11. 0.102 0.102 ↑ 1.6 198 2 / 2

Bitmap Index Scan on "ix_Customer_HeadQuarterId" (cost=0.00..6.82 rows=320 width=0) (actual time=0.101..0.102 rows=198 loops=2)

  • Index Cond: ("HeadQuarterId" = 70,283,727)
12. 143,326.312 143,326.312 ↑ 188.8 5 201,301 / 2

Index Scan using "fki_IneligibleExpenseLine_ExpenseReport" on "IneligibleExpenseLine" el (cost=0.57..153.26 rows=944 width=36) (actual time=0.468..1.424 rows=5 loops=201,301)

  • Index Cond: ("ExpenseReportId" = er."ExpenseReportId")
13. 0.361 0.742 ↑ 1.0 264 2 / 2

Hash (cost=5.64..5.64 rows=264 width=8) (actual time=0.741..0.742 rows=264 loops=2)

  • Buckets: 1,024 Batches: 1 Memory Usage: 19kB
14. 0.381 0.381 ↑ 1.0 264 2 / 2

Seq Scan on "Country" cntr (cost=0.00..5.64 rows=264 width=8) (actual time=0.042..0.381 rows=264 loops=2)

15. 0.249 0.516 ↓ 1.0 191 2 / 2

Hash (cost=3.83..3.83 rows=183 width=7) (actual time=0.515..0.516 rows=191 loops=2)

  • Buckets: 1,024 Batches: 1 Memory Usage: 16kB
16. 0.267 0.267 ↓ 1.0 191 2 / 2

Seq Scan on "Currency" curr (cost=0.00..3.83 rows=183 width=7) (actual time=0.035..0.267 rows=191 loops=2)

17.          

SubPlan (for Gather)

18. 46,633.328 46,633.328 ↑ 1.0 1 1,013,768

Seq Scan on "OTSReportingExchangeRate" ots (cost=0.00..6.85 rows=1 width=8) (actual time=0.017..0.046 rows=1 loops=1,013,768)

  • Filter: (((el."TransactionCurrencyCode" IS NOT NULL) AND (("Currency")::text = (el."TransactionCurrencyCode")::text)) OR ((el."TransactionCurrencyCode" IS NULL) AND (("Currency")::text = (curr."CurrencyPrefix")::text)))
  • Rows Removed by Filter: 189
Planning time : 3.050 ms
Execution time : 210,181.332 ms