explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ze6w

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.007 8.355 ↑ 1.0 25 1

Limit (cost=1.40..68.38 rows=25 width=231) (actual time=7.614..8.355 rows=25 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", m."DeliveryDate
  • Buffers: shared hit=519
2. 7.572 8.348 ↑ 2,701.2 25 1

Nested Loop Left Join (cost=1.40..180,908.09 rows=67,529 width=231) (actual time=7.612..8.348 rows=25 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", m."DeliveryDate
  • Inner Unique: true
  • Join Filter: (t."TicketFunctionID" = t0."ID")
  • Buffers: shared hit=519
3. 0.029 0.751 ↑ 2,701.2 25 1

Nested Loop Left Join (cost=1.40..122,944.59 rows=67,529 width=188) (actual time=0.198..0.751 rows=25 loops=1)

  • Output: m."Status", m."MessageType", m."NumAttempts", m."SendToReceiverType", m."SendToAddress", m."ID", m."CreatedDate", m."DeliveryDate", m0."NextAttemptDate", m0."ID", m0."NumAttempts", d."ID", d."Code", d."Name", t."TicketFunctionID
  • Inner Unique: true
  • Buffers: shared hit=248
4. 0.032 0.447 ↑ 2,701.2 25 1

Nested Loop Left Join (cost=0.98..52,876.71 rows=67,529 width=188) (actual time=0.145..0.447 rows=25 loops=1)

  • Output: m."Status", m."MessageType", m."NumAttempts", m."SendToReceiverType", m."SendToAddress", m."ID", m."CreatedDate", m."DeliveryDate", m."TicketID", m0."NextAttemptDate", m0."ID", m0."NumAttempts", d."ID", d."Code", d."Name
  • Inner Unique: true
  • Buffers: shared hit=148
5. 0.039 0.340 ↑ 2,701.2 25 1

Nested Loop Left Join (cost=0.70..32,902.32 rows=67,529 width=140) (actual time=0.109..0.340 rows=25 loops=1)

  • Output: m."Status", m."MessageType", m."NumAttempts", m."SendToReceiverType", m."SendToAddress", m."ID", m."CreatedDate", m."DeliveryDate", m."SendToDestinationID", m."TicketID", m0."NextAttemptDate", m0."ID", m0."NumAttempts
  • Inner Unique: true
  • Buffers: shared hit=91
6. 0.201 0.201 ↑ 2,701.2 25 1

Index Scan Backward using "IX_Messages_DeliveryDate" on public."Messages" m (cost=0.43..13,625.75 rows=67,529 width=112) (actual time=0.060..0.201 rows=25 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
  • Index Cond: ((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))
  • Filter: (m."Status" = 1)
  • Rows Removed by Filter: 2
  • Buffers: shared hit=27
7. 0.100 0.100 ↓ 0.0 0 25

Index Scan using "IX_MessageQueue_MessageID" on public."MessageQueue" m0 (cost=0.27..0.29 rows=1 width=44) (actual time=0.004..0.004 rows=0 loops=25)

  • Output: m0."ID", m0."LastModifyDateTime", m0."MessageID", m0."NextAttemptDate", m0."NumAttempts", m0."SendPriority", m0."ManualCallPersonServiceAreaID
  • Index Cond: (m0."MessageID" = m."ID")
  • Buffers: shared hit=64
8. 0.075 0.075 ↑ 1.0 1 25

Index Scan using "PK_Destinations" on public."Destinations" d (cost=0.28..0.30 rows=1 width=64) (actual time=0.003..0.003 rows=1 loops=25)

  • 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=57
9. 0.275 0.275 ↑ 1.0 1 25

Index Scan using "PK_Tickets" on public."Tickets" t (cost=0.42..1.04 rows=1 width=32) (actual time=0.011..0.011 rows=1 loops=25)

  • 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=100
10. 0.019 0.025 ↑ 8.0 1 25

Materialize (cost=0.00..1.12 rows=8 width=26) (actual time=0.001..0.001 rows=1 loops=25)

  • Output: t0."Name", t0."ID
  • Buffers: shared hit=1
11. 0.006 0.006 ↑ 8.0 1 1

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

  • Output: t0."Name", t0."ID
  • Buffers: shared hit=1
Planning time : 4.085 ms
Execution time : 9.619 ms