explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WA8U

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 7,541.103 ↑ 6.5 4 1

Limit (cost=1.14..8,434.02 rows=26 width=223) (actual time=0.880..7,541.103 rows=4 loops=1)

2. 0.727 7,541.102 ↑ 902.2 4 1

Nested Loop Left Join (cost=1.14..1,170,550.53 rows=3,609 width=223) (actual time=0.879..7,541.102 rows=4 loops=1)

  • Join Filter: (t."TicketFunctionID" = t0."ID")
  • Rows Removed by Join Filter: 32
3. 0.003 7,540.359 ↑ 902.2 4 1

Nested Loop Left Join (cost=1.14..1,167,433.65 rows=3,609 width=180) (actual time=0.155..7,540.359 rows=4 loops=1)

4. 0.005 7,540.356 ↑ 902.2 4 1

Nested Loop Left Join (cost=0.71..1,143,508.67 rows=3,609 width=180) (actual time=0.154..7,540.356 rows=4 loops=1)

5. 0.002 7,540.351 ↑ 902.2 4 1

Nested Loop Left Join (cost=0.43..1,129,966.96 rows=3,609 width=132) (actual time=0.151..7,540.351 rows=4 loops=1)

  • Join Filter: (m."ID" = m0."MessageID")
6. 7,540.329 7,540.329 ↑ 902.2 4 1

Index Scan Backward using "IX_Messages_CreatedDate" on "Messages" m (cost=0.43..1,129,370.34 rows=3,609 width=104) (actual time=0.131..7,540.329 rows=4 loops=1)

  • Filter: (("DeliveryDate" >= '2020-07-26 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,841
7. 0.002 0.020 ↓ 0.0 0 4

Materialize (cost=0.00..1.17 rows=11 width=44) (actual time=0.005..0.005 rows=0 loops=4)

8. 0.018 0.018 ↓ 0.0 0 1

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

9. 0.000 0.000 ↓ 0.0 0 4

Index Scan using "PK_Destinations" on "Destinations" d (cost=0.28..3.75 rows=1 width=64) (actual time=0.000..0.000 rows=0 loops=4)

  • Index Cond: ("ID" = m."SendToDestinationID")
10. 0.000 0.000 ↓ 0.0 0 4

Index Scan using "PK_Tickets" on "Tickets" t (cost=0.42..6.63 rows=1 width=32) (actual time=0.000..0.000 rows=0 loops=4)

  • Index Cond: ("ID" = m."TicketID")
11. 0.008 0.016 ↑ 1.0 8 4

Materialize (cost=0.00..1.12 rows=8 width=26) (actual time=0.003..0.004 rows=8 loops=4)

12. 0.008 0.008 ↑ 1.0 8 1

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

Planning time : 1.294 ms
Execution time : 7,541.148 ms