explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KTSt

Settings
# exclusive inclusive rows x rows loops node
1. 0.376 10.230 ↓ 65.3 196 1

Sort (cost=1,712.47..1,712.48 rows=3 width=212) (actual time=10.225..10.230 rows=196 loops=1)

  • Sort Key: t.train_number
  • Sort Method: quicksort Memory: 77kB
2. 0.033 9.854 ↓ 65.3 196 1

Merge Join (cost=0.29..1,712.45 rows=3 width=212) (actual time=0.063..9.854 rows=196 loops=1)

  • Merge Cond: (tp.import_id = ti.id)
3. 0.122 9.797 ↑ 1.6 196 1

Nested Loop (cost=0.14..1,779.65 rows=307 width=128) (actual time=0.043..9.797 rows=196 loops=1)

  • Join Filter: (t.period_id = tp.id)
  • Rows Removed by Join Filter: 1960
4. 0.017 0.017 ↑ 1.0 11 1

Index Scan using tt_timetable_period_import_id_index on tt_timetable_period tp (cost=0.14..12.30 rows=11 width=48) (actual time=0.013..0.017 rows=11 loops=1)

5. 0.107 9.658 ↑ 1.6 196 11

Materialize (cost=0.00..1,717.46 rows=307 width=80) (actual time=0.003..0.878 rows=196 loops=11)

6. 9.551 9.551 ↑ 1.6 196 1

Seq Scan on tt_train t (cost=0.00..1,715.92 rows=307 width=80) (actual time=0.022..9.551 rows=196 loops=1)

  • Filter: (((train_number)::text ~~ '162%'::text) OR (lower((name)::text) ~~ '162%'::text))
  • Rows Removed by Filter: 59971
7. 0.024 0.024 ↑ 1.4 5 1

Index Scan using pk_tt_import on tt_import ti (cost=0.15..13.17 rows=7 width=79) (actual time=0.014..0.024 rows=5 loops=1)

  • Index Cond: (id = ANY ('{1,2,3,4,5,6,7}'::bigint[]))
Planning time : 3.101 ms
Execution time : 10.391 ms