explain.depesz.com

PostgreSQL's explain analyze made readable

Result: MK0E

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 19,727.117 ↑ 1.0 10 1

Limit (cost=1,481,805.47..1,481,805.80 rows=10 width=36) (actual time=19,727.108..19,727.117 rows=10 loops=1)

2. 0.014 19,727.114 ↑ 128,538.8 10 1

GroupAggregate (cost=1,481,805.47..1,523,580.58 rows=1,285,388 width=36) (actual time=19,727.106..19,727.114 rows=10 loops=1)

3. 6,972.939 19,727.100 ↑ 107,115.7 12 1

Sort (cost=1,481,805.47..1,485,018.94 rows=1,285,388 width=36) (actual time=19,727.096..19,727.100 rows=12 loops=1)

  • Sort Key: (((t.teldddtel)::text || (t.teltel)::text)), p.pescod, p.devcod
  • Sort Method: external merge Disk: 83712kB
4. 9,750.327 12,754.161 ↑ 1.0 1,262,420 1

Hash Join (cost=213,751.92..1,351,378.61 rows=1,285,388 width=36) (actual time=150.723..12,754.161 rows=1,262,420 loops=1)

  • Hash Cond: (t.pescod = p.pescod)
5. 2,853.189 2,853.189 ↓ 1.0 26,259,946 1

Seq Scan on telefone t (cost=0.00..827,045.28 rows=26,179,028 width=28) (actual time=0.004..2,853.189 rows=26,259,946 loops=1)

6. 36.755 150.645 ↑ 1.0 226,765 1

Hash (cost=210,904.88..210,904.88 rows=227,763 width=16) (actual time=150.645..150.645 rows=226,765 loops=1)

7. 91.776 113.890 ↑ 1.0 226,765 1

Bitmap Heap Scan on pessoa p (cost=5,398.15..210,904.88 rows=227,763 width=16) (actual time=33.139..113.890 rows=226,765 loops=1)

  • Recheck Cond: (carcod = 37)
8. 22.114 22.114 ↓ 1.1 243,449 1

Bitmap Index Scan on pessoa_iu0006 (cost=0.00..5,341.21 rows=227,763 width=0) (actual time=22.114..22.114 rows=243,449 loops=1)

  • Index Cond: (carcod = 37)
Total runtime : 19,745.899 ms