explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jM3H

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 7,160.519 ↑ 4.2 6 1

Limit (cost=1.14..1,290.38 rows=25 width=223) (actual time=6.825..7,160.519 rows=6 loops=1)

  • Output: (enumtostring('MessageStatusEnum'::character varying, m."Status")), m0."NextAttemptDate", (enumtostring('MessageTypeEnum'::character varying, m."MessageType")), (CASE WHEN (m0."ID" IS NULL) THEN m."NumAttempts" ELSE m0."NumAttempts" END), ((d."ID" IS NULL)), d."Code", d."Name", (enumtostring('ReceiverTypeEnum'::character varying, m."SendToReceiverType")), m."SendToAddress", t0."Name", m."ID", m."CreatedDate
  • Buffers: shared hit=314,517 read=963,178
2. 6.745 7,160.516 ↑ 4,526.3 6 1

Nested Loop Left Join (cost=1.14..1,400,537.66 rows=27,158 width=223) (actual time=6.823..7,160.516 rows=6 loops=1)

  • Output: enumtostring('MessageStatusEnum'::character varying, m."Status"), m0."NextAttemptDate", enumtostring('MessageTypeEnum'::character varying, m."MessageType"), CASE WHEN (m0."ID" IS NULL) THEN m."NumAttempts" ELSE m0."NumAttempts" END, (d."ID" IS NULL), d."Code", d."Name", enumtostring('ReceiverTypeEnum'::character varying, m."SendToReceiverType"), m."SendToAddress", t0."Name", m."ID", m."CreatedDate
  • Inner Unique: true
  • Join Filter: (t."TicketFunctionID" = t0."ID")
  • Rows Removed by Join Filter: 16
  • Buffers: shared hit=314,517 read=963,178
3. 0.006 7,153.753 ↑ 4,526.3 6 1

Nested Loop Left Join (cost=1.14..1,377,225.97 rows=27,158 width=180) (actual time=0.092..7,153.753 rows=6 loops=1)

  • Output: m."Status", m."MessageType", m."NumAttempts", m."SendToReceiverType", m."SendToAddress", m."ID", m."CreatedDate", m0."NextAttemptDate", m0."ID", m0."NumAttempts", d."ID", d."Code", d."Name", t."TicketFunctionID
  • Inner Unique: true
  • Buffers: shared hit=314,268 read=963,159
4. 0.008 7,153.669 ↑ 4,526.3 6 1

Nested Loop Left Join (cost=0.71..1,235,248.56 rows=27,158 width=180) (actual time=0.083..7,153.669 rows=6 loops=1)

  • Output: m."Status", m."MessageType", m."NumAttempts", m."SendToReceiverType", m."SendToAddress", m."ID", m."CreatedDate", m."TicketID", m0."NextAttemptDate", m0."ID", m0."NumAttempts", d."ID", d."Code", d."Name
  • Inner Unique: true
  • Buffers: shared hit=314,256 read=963,155
5. 0.010 7,153.631 ↑ 4,526.3 6 1

Nested Loop Left Join (cost=0.43..1,133,642.48 rows=27,158 width=132) (actual time=0.077..7,153.631 rows=6 loops=1)

  • Output: m."Status", m."MessageType", m."NumAttempts", m."SendToReceiverType", m."SendToAddress", m."ID", m."CreatedDate", m."SendToDestinationID", m."TicketID", m0."NextAttemptDate", m0."ID", m0."NumAttempts
  • Inner Unique: true
  • Join Filter: (m."ID" = m0."MessageID")
  • Rows Removed by Join Filter: 66
  • Buffers: shared hit=314,248 read=963,154
6. 7,153.597 7,153.597 ↑ 4,526.3 6 1

Index Scan Backward using "IX_Messages_CreatedDate" on public."Messages" m (cost=0.43..1,129,160.28 rows=27,158 width=104) (actual time=0.054..7,153.597 rows=6 loops=1)

  • Output: m."ID", m."LastModifyDateTime", m."OneCallCenterID", m."Status", m."MessageType", m."Source", m."CreatedDate", m."Content", m."SendToDestinationID", m."TicketID", m."SendToAddress", m."SendToReceiverType", m."DeliveryDate", m."NumAttempts", m."ExternalMessageID", m."ExternalProtocol", m."BroadcastMessageID", m."RecipientPersonID
  • Filter: ((m."DeliveryDate" >= '2020-07-21 00:00:00-04'::timestamp with time zone) AND (m."DeliveryDate" < '2020-07-27 00:00:00-04'::timestamp with time zone) AND (m."Status" = 1))
  • Rows Removed by Filter: 5,404,839
  • Buffers: shared hit=314,247 read=963,154
7. 0.009 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)

  • Output: m0."NextAttemptDate", m0."ID", m0."NumAttempts", m0."MessageID
  • Buffers: shared hit=1
8. 0.015 0.015 ↑ 1.0 11 1

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

  • Output: m0."NextAttemptDate", m0."ID", m0."NumAttempts", m0."MessageID
  • Buffers: shared hit=1
9. 0.030 0.030 ↑ 1.0 1 6

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

  • Output: d."ID", d."Code", d."IsActive", d."IsDeleted", d."LastModifyDateTime", d."Name", d."OneCallCenterID", d."CurrentDeviceID", d."MemberID", d."SendEnabled", d."SendSingleCopy", d."ServiceProviderID", d."EODAuditMessageFormatID", d."TicketMessageFormatID
  • Index Cond: (d."ID" = m."SendToDestinationID")
  • Buffers: shared hit=8 read=1
10. 0.078 0.078 ↑ 1.0 1 6

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

  • Output: t."ID", t."AgentPersonID", t."ExpiresDate", t."LastModifyDateTime", t."OneCallCenterID", t."Status", t."TakenStartDate", t."TicketNumber", t."TicketTypeID", t."Version", t."WorkStartDate", t."LocateTypeID", t."ParentTicketID", t."TicketLinkID", t."IsCanceled", t."ActualGeocodeType", t."TakenEndDate", t."IsDamage", t."TicketFunctionID", t."ResponseDueDate", t."DateCalcSeedDate", t."CreateSource", t."FormID", t."ChildTicketNumber", t."ParentTicketNumber", t."IsMeetRequested", t."DigSiteBounds", t."DigSiteCentroid", t."LockedByPersonID", t."LockedDate", t."QAStatus", t."CopyOfTicketNumber", t."ReferenceTicketNumber", t."IsWorkComplete
  • Index Cond: (t."ID" = m."TicketID")
  • Buffers: shared hit=12 read=4
11. 0.005 0.018 ↑ 2.7 3 6

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

  • Output: t0."Name", t0."ID
  • Buffers: shared hit=1
12. 0.013 0.013 ↑ 1.0 8 1

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

  • Output: t0."Name", t0."ID
  • Buffers: shared hit=1
Planning time : 33.311 ms
Execution time : 7,163.007 ms