explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AaDm

Settings
# exclusive inclusive rows x rows loops node
1. 24.291 88.659 ↑ 1.2 18,179 1

Sort (cost=3,899.25..3,955.41 rows=22,466 width=344) (actual time=81.879..88.659 rows=18,179 loops=1)

  • Sort Key: d0."DealID
  • Sort Method: quicksort Memory: 9909kB
2. 15.029 64.368 ↑ 1.2 18,179 1

Hash Join (cost=781.77..2,275.47 rows=22,466 width=344) (actual time=16.691..64.368 rows=18,179 loops=1)

  • Hash Cond: (d0."MerchantLocationID" = m."MerchantLocationID")
3. 15.624 38.713 ↑ 1.2 18,179 1

Hash Semi Join (cost=342.44..1,527.22 rows=22,466 width=70) (actual time=6.049..38.713 rows=18,179 loops=1)

  • Hash Cond: (d0."DealID" = x."DealID")
4. 17.058 17.058 ↑ 1.0 29,831 1

Index Scan using "IX_Deal_Location_MerchantLocationID_New" on "Deal_Location" d0 (cost=0.29..856.52 rows=29,949 width=70) (actual time=0.009..17.058 rows=29,831 loops=1)

5. 0.441 6.031 ↑ 1.1 1,169 1

Hash (cost=326.61..326.61 rows=1,243 width=16) (actual time=6.031..6.031 rows=1,169 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 71kB
6. 1.032 5.590 ↑ 1.1 1,169 1

Merge Join (cost=1.16..326.61 rows=1,243 width=16) (actual time=0.073..5.590 rows=1,169 loops=1)

  • Merge Cond: (x."DealID" = d."DealID")
7. 1.058 3.909 ↑ 1.1 1,169 1

Merge Join (cost=0.88..276.17 rows=1,243 width=12) (actual time=0.057..3.909 rows=1,169 loops=1)

  • Merge Cond: ("x.Deal"."DealID" = x."DealID")
8. 1.077 2.408 ↑ 1.1 1,169 1

Merge Semi Join (cost=0.60..219.83 rows=1,243 width=8) (actual time=0.042..2.408 rows=1,169 loops=1)

  • Merge Cond: ("x.Deal"."DealID" = e."DealID")
9. 0.800 0.800 ↑ 1.0 1,664 1

Index Only Scan using "IX_Deals_ID_Status_Date" on "Deals" "x.Deal" (cost=0.28..47.70 rows=1,736 width=4) (actual time=0.027..0.800 rows=1,664 loops=1)

  • Index Cond: ("StartDate" <= now())
  • Heap Fetches: 890
10. 0.531 0.531 ↑ 1.1 1,172 1

Index Only Scan using "IX_Deals_Eligibility_EligibilityID_DealID" on "Deal_Eligibility" e (cost=0.29..156.59 rows=1,247 width=4) (actual time=0.010..0.531 rows=1,172 loops=1)

  • Index Cond: ("EligibilityID" = 55)
  • Heap Fetches: 290
11. 0.443 0.443 ↑ 1.0 1,669 1

Index Only Scan using "IX_Deal_Tracker_DealID" on "Deal_Tracker" x (cost=0.28..38.33 rows=1,670 width=4) (actual time=0.012..0.443 rows=1,669 loops=1)

  • Heap Fetches: 0
12. 0.649 0.649 ↑ 1.0 1,669 1

Index Only Scan using "PK_Deals" on "Deals" d (cost=0.28..38.39 rows=1,741 width=4) (actual time=0.013..0.649 rows=1,669 loops=1)

  • Heap Fetches: 894
13. 4.016 10.626 ↑ 1.0 5,945 1

Hash (cost=361.95..361.95 rows=6,191 width=274) (actual time=10.626..10.626 rows=5,945 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 1616kB
14. 4.150 6.610 ↑ 1.0 5,945 1

Merge Join (cost=0.42..361.95 rows=6,191 width=274) (actual time=0.025..6.610 rows=5,945 loops=1)

  • Merge Cond: (s."StateID" = m."StateID")
15. 0.007 0.007 ↑ 1.0 16 1

Index Scan using "PK_States" on "States" s (cost=0.14..3.38 rows=16 width=68) (actual time=0.002..0.007 rows=16 loops=1)

16. 2.453 2.453 ↑ 1.0 5,945 1

Index Scan using "IX_Merchant_Locations_StateID_New" on "Merchant_Locations" m (cost=0.28..281.15 rows=6,191 width=206) (actual time=0.020..2.453 rows=5,945 loops=1)