explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hZ4Z

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

Sort (cost=80,855.20..81,297.65 rows=176,982 width=48) (actual rows= loops=)

  • Sort Key: e.cpf, e.idsituacao
2. 0.000 0.000 ↓ 0.0

Hash Join (cost=54,706.69..65,428.35 rows=176,982 width=48) (actual rows= loops=)

  • Hash Cond: (e.idregiao = r.idregiao)
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=54,695.79..56,351.37 rows=176,982 width=50) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

HashAggregate (cost=54,695.37..54,697.37 rows=200 width=12) (actual rows= loops=)

  • Group Key: ("ANY_subquery".cpf)::text
5. 0.000 0.000 ↓ 0.0

Subquery Scan on ANY_subquery (cost=46,824.98..53,820.88 rows=349,795 width=12) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

HashAggregate (cost=46,824.98..50,322.93 rows=349,795 width=12) (actual rows= loops=)

  • Group Key: eleitores.cpf
  • Filter: (count(*) > 1)
7. 0.000 0.000 ↓ 0.0

Seq Scan on eleitores (cost=0.00..45,055.16 rows=353,964 width=12) (actual rows= loops=)

  • Filter: (idregiao IS NOT NULL)
8. 0.000 0.000 ↓ 0.0

Index Scan using eleitores_idx5 on eleitores e (cost=0.42..8.26 rows=1 width=50) (actual rows= loops=)

  • Index Cond: ((cpf)::text = ("ANY_subquery".cpf)::text)
  • Filter: (idregiao IS NOT NULL)
9. 0.000 0.000 ↓ 0.0

Hash (cost=10.40..10.40 rows=40 width=162) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Seq Scan on regioes r (cost=0.00..10.40 rows=40 width=162) (actual rows= loops=)