explain.depesz.com

PostgreSQL's explain analyze made readable

Result: O3A2

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 2,858.525 ↑ 1.0 10 1

Limit (cost=755,146.26..755,146.48 rows=10 width=28) (actual time=2,858.507..2,858.525 rows=10 loops=1)

2. 653.071 2,858.523 ↑ 11,349.4 10 1

HashAggregate (cost=755,146.26..757,699.87 rows=113,494 width=28) (actual time=2,858.507..2,858.523 rows=10 loops=1)

  • Filter: (count(*) > 1)
3. 321.255 2,205.452 ↓ 11.1 1,262,420 1

Nested Loop (cost=206,820.03..753,727.58 rows=113,494 width=28) (actual time=209.931..2,205.452 rows=1,262,420 loops=1)

4. 232.434 523.607 ↓ 11.2 226,765 1

Hash Join (cost=206,820.03..415,744.30 rows=20,192 width=16) (actual time=209.911..523.607 rows=226,765 loops=1)

  • Hash Cond: (p.devcod = dev.devcod)
5. 92.655 116.248 ↑ 1.1 226,765 1

Bitmap Heap Scan on pessoa p (cost=5,626.00..211,664.31 rows=238,582 width=20) (actual time=34.882..116.248 rows=226,765 loops=1)

  • Recheck Cond: (carcod = 37)
6. 23.593 23.593 ↓ 1.0 243,449 1

Bitmap Index Scan on pessoa_iu0006 (cost=0.00..5,566.35 rows=238,582 width=0) (actual time=23.593..23.593 rows=243,449 loops=1)

  • Index Cond: (carcod = 37)
7. 35.679 174.925 ↑ 1.0 226,765 1

Hash (cost=198,329.68..198,329.68 rows=229,148 width=12) (actual time=174.925..174.925 rows=226,765 loops=1)

8. 114.518 139.246 ↑ 1.0 226,765 1

Bitmap Heap Scan on devedor dev (cost=4,996.53..198,329.68 rows=229,148 width=12) (actual time=39.142..139.246 rows=226,765 loops=1)

  • Recheck Cond: (carcod = 37)
9. 24.728 24.728 ↑ 1.0 227,311 1

Bitmap Index Scan on idevedor3 (cost=0.00..4,939.24 rows=229,148 width=0) (actual time=24.728..24.728 rows=227,311 loops=1)

  • Index Cond: (carcod = 37)
10. 1,360.590 1,360.590 ↑ 22.3 6 226,765

Index Scan using telefone_iu_002 on telefone t (cost=0.00..15.05 rows=134 width=28) (actual time=0.003..0.006 rows=6 loops=226,765)

  • Index Cond: (t.pescod = p.pescod)
Total runtime : 2,858.895 ms