explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9rKd

Settings
# exclusive inclusive rows x rows loops node
1. 0.034 898.961 ↑ 1.0 35 1

Limit (cost=104.98..204.03 rows=35 width=170) (actual time=8.630..898.961 rows=35 loops=1)

  • Buffers: shared hit=968 read=119
2. 1.155 898.927 ↑ 186.9 70 1

Nested Loop (cost=5.93..37,032.14 rows=13,084 width=170) (actual time=7.749..898.927 rows=70 loops=1)

  • Buffers: shared hit=968 read=119
3. 0.045 589.072 ↑ 186.9 70 1

Merge Append (cost=5.51..13,800.47 rows=13,084 width=885) (actual time=7.721..589.072 rows=70 loops=1)

  • Sort Key: ((fts.ts_vector_fts <=> '''medic'''::tsquery))
  • Buffers: shared hit=367 read=88
4. 589.027 589.027 ↑ 186.9 70 1

Index Scan using tb_documento_expediente_fts_y2016_ts_vector_fts_idx on tb_documento_expediente_fts_y2016 fts (cost=5.50..13,669.62 rows=13,084 width=885) (actual time=7.721..589.027 rows=70 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=367 read=88
5. 0.140 308.700 ↑ 1.0 1 70

Append (cost=0.42..1.76 rows=1 width=162) (actual time=4.409..4.410 rows=1 loops=70)

  • Buffers: shared hit=249 read=31
6. 308.560 308.560 ↑ 1.0 1 70

Index Scan using tb_documento_p_y2016_id_documento_idx on tb_documento_p_y2016 d (cost=0.42..1.76 rows=1 width=162) (actual time=4.408..4.408 rows=1 loops=70)

  • 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=249 read=31
Planning time : 1.389 ms
Execution time : 899.037 ms