explain.depesz.com

PostgreSQL's explain analyze made readable

Result: B5VI

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Update on public."Activities" (cost=685,202.54..1,027,529.77 rows=803,303 width=436) (actual rows= loops=)

2.          

CTE insertedtransactions

3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=12.94..1,699.00 rows=1,122,140 width=217) (actual rows= loops=)

  • Output: "Transactions"."Id", "Transactions"."TenantId", "Transactions"."CreatedDateTime", "Transactions"."IdentityId", "Transactions"."SourceType", "Transactions"."SourceId", "Transactions"."CustomData", "Transactions"."OriginalAmount", "Transactions"."Multiplier", "Transactions"."TotalAmount
4. 0.000 0.000 ↓ 0.0

HashAggregate (cost=12.50..14.50 rows=200 width=32) (actual rows= loops=)

  • Output: tab.tab
  • Group Key: (tab.tab)::bigint
5. 0.000 0.000 ↓ 0.0

Function Scan on pg_catalog.regexp_split_to_table tab (cost=0.00..10.00 rows=1,000 width=32) (actual rows= loops=)

  • Output: tab.tab, (tab.tab)::bigint
  • Function Call: regexp_split_to_table('1,2,3,4,400258,400259,400260,400261,400262,400263'::text, ','::text)
6. 0.000 0.000 ↓ 0.0

Index Scan using "PK_Transactions" on public."Transactions" (cost=0.43..8.41 rows=1 width=217) (actual rows= loops=)

  • Output: "Transactions"."Id", "Transactions"."TenantId", "Transactions"."CreatedDateTime", "Transactions"."IdentityId", "Transactions"."SourceType", "Transactions"."SourceId", "Transactions"."CustomData", "Transactions"."OriginalAmount", "Transactions"."Multiplier", "Transactions"."TotalAmount
  • Index Cond: ("Transactions"."Id" = (tab.tab)::bigint)
7. 0.000 0.000 ↓ 0.0

Hash Join (cost=683,503.54..1,025,830.77 rows=803,303 width=436) (actual rows= loops=)

  • Output: "Activities"."Id", "Activities"."DescriptionPlaceholdersJson", "Activities"."Type", "Activities"."SubType", "Activities"."CreationDateTime", "Activities"."IdentityId", "Activities"."CustomerProfileId", "Activities"."InternalUpdatedDateTime", "Activities"."CustomData", t."Id", "Activities"."Value", "Activities"."TenantId", "Activities".ctid, t.*
  • Hash Cond: (t."SourceId" = "Activities"."Id")
8. 0.000 0.000 ↓ 0.0

CTE Scan on insertedtransactions t (cost=0.00..22,442.80 rows=1,122,140 width=104) (actual rows= loops=)

  • Output: t."Id", t.*, t."SourceId
9. 0.000 0.000 ↓ 0.0

Hash (cost=348,570.25..348,570.25 rows=5,549,703 width=364) (actual rows= loops=)

  • Output: "Activities"."Id", "Activities"."DescriptionPlaceholdersJson", "Activities"."Type", "Activities"."SubType", "Activities"."CreationDateTime", "Activities"."IdentityId", "Activities"."CustomerProfileId", "Activities"."InternalUpdatedDateTime", "Activities"."CustomData", "Activities"."Value", "Activities"."TenantId", "Activities".ctid
10. 0.000 0.000 ↓ 0.0

Seq Scan on public."Activities" (cost=0.00..348,570.25 rows=5,549,703 width=364) (actual rows= loops=)

  • Output: "Activities"."Id", "Activities"."DescriptionPlaceholdersJson", "Activities"."Type", "Activities"."SubType", "Activities"."CreationDateTime", "Activities"."IdentityId", "Activities"."CustomerProfileId", "Activities"."InternalUpdatedDateTime", "Activities"."CustomData", "Activities"."Value", "Activities"."TenantId", "Activities".ctid
  • Filter: ("Activities"."TransactionId" IS NULL)