explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mvD1

Settings
# exclusive inclusive rows x rows loops node
1. 22,782.718 36,717.025 ↓ 0.0 0 1

Delete on cards_transactions (cost=30,885.20..401,451.42 rows=9,330,713 width=12) (actual time=36,717.025..36,717.025 rows=0 loops=1)

2. 5,449.808 13,934.307 ↑ 2.5 3,750,815 1

Hash Join (cost=30,885.20..401,451.42 rows=9,330,713 width=12) (actual time=551.433..13,934.307 rows=3,750,815 loops=1)

  • Hash Cond: (cards_transactions.card_id = cards.id)
3. 7,935.058 7,935.058 ↑ 1.0 9,330,180 1

Seq Scan on cards_transactions (cost=0.00..211,491.13 rows=9,330,713 width=10) (actual time=0.808..7,935.058 rows=9,330,180 loops=1)

4. 89.711 549.441 ↓ 1.0 267,826 1

Hash (cost=26,237.47..26,237.47 rows=267,338 width=10) (actual time=549.441..549.441 rows=267,826 loops=1)

  • Buckets: 524288 Batches: 2 Memory Usage: 9861kB
5. 459.730 459.730 ↓ 1.0 267,826 1

Seq Scan on cards (cost=0.00..26,237.47 rows=267,338 width=10) (actual time=0.021..459.730 rows=267,826 loops=1)

  • Filter: ((user_id IS NULL) AND (validity < now()))
  • Rows Removed by Filter: 520092