explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nsla

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 8.356 ↑ 1.0 35 1

Nested Loop (cost=6.99..137.18 rows=35 width=166) (actual time=7.421..8.356 rows=35 loops=1)

  • Buffers: shared hit=601
2. 0.005 8.146 ↑ 1.0 35 1

Limit (cost=6.57..43.65 rows=35 width=12) (actual time=7.406..8.146 rows=35 loops=1)

  • Buffers: shared hit=461
3. 0.005 8.141 ↑ 363.4 36 1

Merge Append (cost=5.51..13,865.89 rows=13,084 width=12) (actual time=7.373..8.141 rows=36 loops=1)

  • Sort Key: ((fts.ts_vector_fts <=> '''medic'''::tsquery))
  • Buffers: shared hit=461
4. 8.136 8.136 ↑ 363.4 36 1

Index Scan using tb_documento_expediente_fts_y2016_ts_vector_fts_idx on tb_documento_expediente_fts_y2016 fts (cost=5.50..13,735.04 rows=13,084 width=12) (actual time=7.372..8.136 rows=36 loops=1)

  • Index Cond: (ts_vector_fts @@ '''medic'''::tsquery)
  • Order By: (ts_vector_fts <=> '''medic'''::tsquery)
  • Filter: ((dt_protocolo_central >= '2015-01-21 00:00:00'::timestamp without time zone) AND (dt_protocolo_central <= '2016-12-31 00:00:00'::timestamp without time zone))
  • Rows Removed by Filter: 3
  • Buffers: shared hit=461
5. 0.035 0.210 ↑ 1.0 1 35

Append (cost=0.42..2.65 rows=1 width=162) (actual time=0.005..0.006 rows=1 loops=35)

  • Buffers: shared hit=140
6. 0.175 0.175 ↑ 1.0 1 35

Index Scan using tb_documento_p_y2016_id_documento_idx on tb_documento_p_y2016 d (cost=0.42..2.65 rows=1 width=162) (actual time=0.005..0.005 rows=1 loops=35)

  • Index Cond: (id_documento = fts.id_documento_expediente_fts)
  • Filter: ((dt_protocolo_central >= '2015-01-21 00:00:00'::timestamp without time zone) AND (dt_protocolo_central <= '2016-12-31 00:00:00'::timestamp without time zone))
  • Buffers: shared hit=140
Planning time : 1.284 ms
Execution time : 8.396 ms