explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CJJY

Settings
# exclusive inclusive rows x rows loops node
1. 211.666 50,651.236 ↓ 1.6 304 1

GroupAggregate (cost=2,638,554.76..2,638,925.10 rows=187 width=16) (actual time=50,127.249..50,651.236 rows=304 loops=1)

  • Group Key: ab.breach_id
2. 759.039 50,439.570 ↓ 18.7 919,817 1

Sort (cost=2,638,554.76..2,638,677.58 rows=49,129 width=12) (actual time=50,127.243..50,439.570 rows=919,817 loops=1)

  • Sort Key: ab.breach_id
  • Sort Method: external merge Disk: 19,712kB
3. 276.441 49,680.531 ↓ 18.7 919,817 1

Hash Left Join (cost=1,363,240.53..2,634,726.56 rows=49,129 width=12) (actual time=18,192.122..49,680.531 rows=919,817 loops=1)

  • Hash Cond: ((dom.organisation_id = oa.organisation_id) AND (ab.account_id = oa.account_id))
  • Filter: ((oa.ignored IS NULL) OR (NOT oa.ignored))
4. 22,916.589 49,404.069 ↑ 6.2 919,817 1

Hash Join (cost=1,363,237.89..2,591,613.40 rows=5,748,067 width=28) (actual time=18,192.087..49,404.069 rows=919,817 loops=1)

  • Hash Cond: (ab.account_id = acc.id)
5. 25,486.319 25,486.319 ↓ 1.0 35,707,637 1

Seq Scan on hibp_account_breaches ab (cost=0.00..584,504.99 rows=35,706,699 width=16) (actual time=3.474..25,486.319 rows=35,707,637 loops=1)

6. 258.113 1,001.161 ↑ 4.9 612,654 1

Hash (cost=1,311,536.47..1,311,536.47 rows=2,974,273 width=12) (actual time=1,001.161..1,001.161 rows=612,654 loops=1)

  • Buckets: 131,072 Batches: 64 Memory Usage: 1,474kB
7. 183.697 743.048 ↑ 4.9 612,654 1

Nested Loop (cost=0.84..1,311,536.47 rows=2,974,273 width=12) (actual time=0.087..743.048 rows=612,654 loops=1)

8. 3.646 3.646 ↓ 1.5 1,165 1

Index Only Scan using unique_domain_for_org_2 on organisation_email_domains dom (cost=0.28..86.28 rows=800 width=26) (actual time=0.025..3.646 rows=1,165 loops=1)

  • Index Cond: (organisation_id = 1,834)
  • Heap Fetches: 1,165
9. 555.705 555.705 ↑ 40.4 526 1,165

Index Scan using hibp_exposed_accounts_domain_idx on hibp_exposed_accounts acc (cost=0.56..1,426.94 rows=21,237 width=16) (actual time=0.017..0.477 rows=526 loops=1,165)

  • Index Cond: (domain = dom.domain)
10. 0.001 0.021 ↓ 0.0 0 1

Hash (cost=2.62..2.62 rows=1 width=9) (actual time=0.021..0.021 rows=0 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
11. 0.020 0.020 ↓ 0.0 0 1

Seq Scan on hibp_organisation_accounts oa (cost=0.00..2.62 rows=1 width=9) (actual time=0.020..0.020 rows=0 loops=1)

  • Filter: (organisation_id = 1,834)
  • Rows Removed by Filter: 131
Planning time : 4.249 ms
Execution time : 50,656.021 ms