explain.depesz.com

PostgreSQL's explain analyze made readable

Result: TmF1

Settings
# exclusive inclusive rows x rows loops node
1. 3.737 156.827 ↓ 0.0 0 1

Delete on campaign_contact (cost=107,577.73..216,869.31 rows=554 width=18) (actual time=156.827..156.827 rows=0 loops=1)

2. 0.251 153.090 ↑ 1.6 351 1

Nested Loop Anti Join (cost=107,577.73..216,869.31 rows=554 width=18) (actual time=22.074..153.090 rows=351 loops=1)

3. 45.568 152.137 ↑ 1.9 351 1

Hash Join (cost=107,577.16..214,651.93 rows=654 width=16) (actual time=22.061..152.137 rows=351 loops=1)

  • Hash Cond: (campaign_contact.cell = other_campaign_contact.cell)
4. 85.786 85.786 ↓ 5.9 299,992 1

Index Scan using campaign_contact_campaign_id_index on campaign_contact (cost=0.57..106,942.09 rows=50,760 width=22) (actual time=0.015..85.786 rows=299,992 loops=1)

  • Index Cond: (campaign_id = 4,966)
5. 6.522 20.783 ↑ 1.6 31,192 1

Hash (cost=106,942.09..106,942.09 rows=50,760 width=18) (actual time=20.783..20.783 rows=31,192 loops=1)

  • Buckets: 65,536 Batches: 1 Memory Usage: 2,066kB
6. 14.261 14.261 ↑ 1.6 31,192 1

Index Scan using campaign_contact_campaign_id_index on campaign_contact other_campaign_contact (cost=0.57..106,942.09 rows=50,760 width=18) (actual time=0.025..14.261 rows=31,192 loops=1)

  • Index Cond: (campaign_id = 4,935)
7. 0.702 0.702 ↓ 0.0 0 351

Index Scan using message_campaign_contact_id_index on message (cost=0.57..20.88 rows=8 width=10) (actual time=0.002..0.002 rows=0 loops=351)

  • Index Cond: (campaign_contact_id = campaign_contact.id)
Planning time : 0.590 ms
Execution time : 175.377 ms
Trigger times:
Trigger Name:Total time:Calls:Average time:
for constraint question_response_campaign_contact_id_foreign 6.489 ms 351 0.018 ms
for constraint message_campaign_contact_id_foreign 5.964 ms 351 0.017 ms
for constraint campaign_contact_tag_campaign_contact_id_foreign 5.742 ms 351 0.016 ms