explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LxOu

Settings
# exclusive inclusive rows x rows loops node
1. 296.405 10,873.091 ↓ 8.0 8 1

Limit (cost=3,244,842.88..3,244,843.89 rows=1 width=289) (actual time=10,872.952..10,873.091 rows=8 loops=1)

  • Functions: 26
  • Options: Inlining true, Optimization true, Expressions true, Deforming true
  • Timing: Generation 3.290 ms, Inlining 7.319 ms, Optimization 172.688 ms, Emission 115.854 ms, Total 299.151 ms
2. 1.319 10,576.686 ↓ 8.0 8 1

Result (cost=3,244,842.88..3,244,843.89 rows=1 width=289) (actual time=10,576.549..10,576.686 rows=8 loops=1)

3. 0.045 10,575.367 ↓ 8.0 8 1

Sort (cost=3,244,842.88..3,244,842.88 rows=1 width=173) (actual time=10,575.365..10,575.367 rows=8 loops=1)

  • Sort Key: (COALESCE(m."DeliveryDate", '0001-01-01 00:00:00+00'::timestamp with time zone)) DESC
  • Sort Method: quicksort Memory: 27kB
4. 0.024 10,575.322 ↓ 8.0 8 1

Nested Loop Left Join (cost=0.43..3,244,842.87 rows=1 width=173) (actual time=5,291.053..10,575.322 rows=8 loops=1)

  • Join Filter: ("m.Ticket"."TicketTypeID" = "m.Ticket.TicketType"."ID")
  • Rows Removed by Join Filter: 16
5. 0.065 10,575.282 ↓ 8.0 8 1

Nested Loop Left Join (cost=0.43..3,244,841.78 rows=1 width=204) (actual time=5,291.036..10,575.282 rows=8 loops=1)

6. 0.713 10,575.121 ↓ 8.0 8 1

Nested Loop Left Join (cost=0.00..3,244,839.13 rows=1 width=194) (actual time=5,290.960..10,575.121 rows=8 loops=1)

  • Join Filter: (m."SendToDestinationID" = p."ID")
  • Rows Removed by Join Filter: 17432
7. 0.046 10,571.208 ↓ 8.0 8 1

Nested Loop Left Join (cost=0.00..3,244,638.17 rows=1 width=155) (actual time=5,290.072..10,571.208 rows=8 loops=1)

  • Join Filter: (m."ID" = "m.Queue"."MessageID")
8. 10,571.138 10,571.138 ↓ 8.0 8 1

Seq Scan on "Messages" m (cost=0.00..3,244,637.16 rows=1 width=127) (actual time=5,290.024..10,571.138 rows=8 loops=1)

  • Filter: (("DeliveryDate" >= '2020-01-10 05:00:00+00'::timestamp with time zone) AND ("DeliveryDate" < '2020-01-11 05:00:00+00'::timestamp with time zone
  • Rows Removed by Filter: 16583339
9. 0.024 0.024 ↓ 0.0 0 8

Seq Scan on "MessageQueue" "m.Queue" (cost=0.00..1.00 rows=1 width=44) (actual time=0.003..0.003 rows=0 loops=8)

10. 3.200 3.200 ↑ 1.0 2,179 8

Seq Scan on "Destinations" p (cost=0.00..173.72 rows=2,179 width=55) (actual time=0.003..0.400 rows=2,179 loops=8)

  • Filter: (NOT "IsDeleted")
  • Rows Removed by Filter: 1493
11. 0.096 0.096 ↑ 1.0 1 8

Index Scan using "PK_Tickets" on "Tickets" "m.Ticket" (cost=0.43..2.65 rows=1 width=42) (actual time=0.012..0.012 rows=1 loops=8)

  • Index Cond: ("ID" = m."TicketID")
12. 0.016 0.016 ↑ 1.3 3 8

Seq Scan on "TicketTypes" "m.Ticket.TicketType" (cost=0.00..1.04 rows=4 width=25) (actual time=0.002..0.002 rows=3 loops=8)

Planning time : 1.041 ms
Execution time : 10,876.613 ms