explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9wOV

Settings
# exclusive inclusive rows x rows loops node
1. 370,394.166 381,826.008 ↓ 0.0 0 1

Update on tmp_phones (cost=33.09..3,102,908.27 rows=67,013,556 width=319) (actual time=381,826.008..381,826.008 rows=0 loops=1)

2. 5,098.180 11,431.842 ↑ 17.2 3,903,172 1

Nested Loop (cost=33.09..3,102,908.27 rows=67,013,556 width=319) (actual time=0.176..11,431.842 rows=3,903,172 loops=1)

3. 6,333.662 6,333.662 ↑ 5.7 1,951,586 1

Seq Scan on tmp_phones (cost=0.00..757,350.26 rows=11,168,926 width=218) (actual time=0.021..6,333.662 rows=1,951,586 loops=1)

4. 0.000 0.000 ↑ 3.0 2 1,951,586

Materialize (cost=33.09..83.57 rows=6 width=75) (actual time=0.000..0.000 rows=2 loops=1,951,586)

5. 0.005 0.161 ↑ 3.0 2 1

Nested Loop (cost=33.09..83.54 rows=6 width=75) (actual time=0.147..0.161 rows=2 loops=1)

6. 0.006 0.092 ↑ 3.0 2 1

Subquery Scan on sel (cost=32.66..32.82 rows=6 width=94) (actual time=0.088..0.092 rows=2 loops=1)

7. 0.008 0.086 ↑ 3.0 2 1

GroupAggregate (cost=32.66..32.76 rows=6 width=38) (actual time=0.083..0.086 rows=2 loops=1)

  • Group Key: tmp_phones_1.person_no
8. 0.008 0.078 ↑ 3.0 2 1

Sort (cost=32.66..32.67 rows=6 width=14) (actual time=0.077..0.078 rows=2 loops=1)

  • Sort Key: tmp_phones_1.person_no
  • Sort Method: quicksort Memory: 25kB
9. 0.070 0.070 ↑ 3.0 2 1

Index Scan using ix_tmp_phones_searchperson on tmp_phones tmp_phones_1 (cost=0.56..32.58 rows=6 width=14) (actual time=0.020..0.070 rows=2 loops=1)

  • Index Cond: (pin = '985607'::text)
  • Filter: (phonetype_id <> ALL ('{10003,10005,10009}'::integer[]))
  • Rows Removed by Filter: 5
10. 0.064 0.064 ↑ 1.0 1 2

Index Scan using ix_tmp_phones_no on tmp_phones t (cost=0.43..8.45 rows=1 width=21) (actual time=0.032..0.032 rows=1 loops=2)

  • Index Cond: (rowid = sel.rowid)