explain.depesz.com

PostgreSQL's explain analyze made readable

Result: W4xQ

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 8,928.290 ↑ 4.2 6 1

Limit (cost=1.14..1,282.78 rows=25 width=223) (actual time=11.016..8,928.290 rows=6 loops=1)

2. 10.933 8,928.288 ↑ 4,559.5 6 1

Nested Loop Left Join (cost=1.14..1,402,478.94 rows=27,357 width=223) (actual time=11.014..8,928.288 rows=6 loops=1)

  • Join Filter: (t."TicketFunctionID" = t0."ID")
  • Rows Removed by Join Filter: 16
3. 0.007 8,917.319 ↑ 4,559.5 6 1

Nested Loop Left Join (cost=1.14..1,378,996.45 rows=27,357 width=180) (actual time=0.112..8,917.319 rows=6 loops=1)

4. 0.021 8,917.240 ↑ 4,559.5 6 1

Nested Loop Left Join (cost=0.71..1,236,186.97 rows=27,357 width=180) (actual time=0.108..8,917.240 rows=6 loops=1)

5. 0.013 8,917.165 ↑ 4,559.5 6 1

Nested Loop Left Join (cost=0.43..1,133,834.20 rows=27,357 width=132) (actual time=0.097..8,917.165 rows=6 loops=1)

  • Join Filter: (m."ID" = m0."MessageID")
  • Rows Removed by Join Filter: 66
6. 8,917.128 8,917.128 ↑ 4,559.5 6 1

Index Scan Backward using "IX_Messages_CreatedDate" on "Messages" m (cost=0.43..1,129,319.16 rows=27,357 width=104) (actual time=0.071..8,917.128 rows=6 loops=1)

  • Filter: (("DeliveryDate" >= '2020-07-21 00:00:00-04'::timestamp with time zone) AND ("DeliveryDate" < '2020-07-27 00:00:00-04'::timestamp with time zone) AND ("Status" = 1))
  • Rows Removed by Filter: 5,404,839
7. 0.007 0.024 ↑ 1.0 11 6

Materialize (cost=0.00..1.17 rows=11 width=44) (actual time=0.003..0.004 rows=11 loops=6)

8. 0.017 0.017 ↑ 1.0 11 1

Seq Scan on "MessageQueue" m0 (cost=0.00..1.11 rows=11 width=44) (actual time=0.015..0.017 rows=11 loops=1)

9. 0.054 0.054 ↑ 1.0 1 6

Index Scan using "PK_Destinations" on "Destinations" d (cost=0.28..3.74 rows=1 width=64) (actual time=0.009..0.009 rows=1 loops=6)

  • Index Cond: ("ID" = m."SendToDestinationID")
10. 0.072 0.072 ↑ 1.0 1 6

Index Scan using "PK_Tickets" on "Tickets" t (cost=0.42..5.22 rows=1 width=32) (actual time=0.012..0.012 rows=1 loops=6)

  • Index Cond: ("ID" = m."TicketID")
11. 0.014 0.036 ↑ 2.7 3 6

Materialize (cost=0.00..1.12 rows=8 width=26) (actual time=0.005..0.006 rows=3 loops=6)

12. 0.022 0.022 ↑ 1.0 8 1

Seq Scan on "TicketFunctions" t0 (cost=0.00..1.08 rows=8 width=26) (actual time=0.020..0.022 rows=8 loops=1)

Planning time : 40.496 ms
Execution time : 8,931.189 ms