explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gRPw

Settings
# exclusive inclusive rows x rows loops node
1. 1.107 592.667 ↓ 0.0 0 1

Delete on campaign_contact (cost=528,011.76..552,872.00 rows=2,215 width=24) (actual time=592.667..592.667 rows=0 loops=1)

2. 0.344 591.560 ↑ 5.5 403 1

Nested Loop Anti Join (cost=528,011.76..552,872.00 rows=2,215 width=24) (actual time=588.908..591.560 rows=403 loops=1)

3. 0.216 590.813 ↑ 6.5 403 1

Nested Loop (cost=528,011.19..550,186.83 rows=2,614 width=22) (actual time=588.898..590.813 rows=403 loops=1)

4. 0.262 588.985 ↑ 6.5 403 1

HashAggregate (cost=528,010.62..528,036.76 rows=2,614 width=16) (actual time=588.878..588.985 rows=403 loops=1)

  • Group Key: campaign_contact_1.id
5. 100.625 588.723 ↑ 6.5 403 1

Hash Join (cost=107,577.16..528,004.09 rows=2,614 width=16) (actual time=482.311..588.723 rows=403 loops=1)

  • Hash Cond: (other_contact.cell = campaign_contact_1.cell)
6. 345.885 345.885 ↓ 1.2 235,176 1

Index Scan using campaign_contact_campaign_id_index on campaign_contact other_contact (cost=0.57..419,894.52 rows=203,041 width=18) (actual time=0.036..345.885 rows=235,176 loops=1)

  • Index Cond: (campaign_id = ANY ('{4935,4864,4841,4819}'::integer[]))
7. 61.001 142.213 ↓ 5.9 299,992 1

Hash (cost=106,942.09..106,942.09 rows=50,760 width=22) (actual time=142.213..142.213 rows=299,992 loops=1)

  • Buckets: 65536 (originally 65536) Batches: 8 (originally 1) Memory Usage: 3585kB
8. 81.212 81.212 ↓ 5.9 299,992 1

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

  • Index Cond: (campaign_id = 4966)
9. 1.612 1.612 ↑ 1.0 1 403

Index Scan using campaign_contact_pkey on campaign_contact (cost=0.57..8.47 rows=1 width=10) (actual time=0.004..0.004 rows=1 loops=403)

  • Index Cond: (id = campaign_contact_1.id)
10. 0.403 0.403 ↓ 0.0 0 403

Index Scan using message_campaign_contact_id_index on message (cost=0.57..3.85 rows=8 width=10) (actual time=0.001..0.001 rows=0 loops=403)

  • Index Cond: (campaign_contact_id = campaign_contact.id)
Planning time : 0.553 ms
Execution time : 612.458 ms
Trigger times:
Trigger Name:Total time:Calls:Average time:
for constraint question_response_campaign_contact_id_foreign 6.897 ms 403 0.017 ms
for constraint message_campaign_contact_id_foreign 6.333 ms 403 0.016 ms
for constraint campaign_contact_tag_campaign_contact_id_foreign 6.205 ms 403 0.015 ms