explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Ktq2

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 20,383.791 ↑ 1.0 35 1

Limit (cost=7,467.46..7,467.55 rows=35 width=854) (actual time=20,383.787..20,383.791 rows=35 loops=1)

  • Buffers: shared hit=53788 read=22134
2. 16.558 20,383.787 ↑ 143.4 36 1

Sort (cost=7,467.46..7,480.37 rows=5,163 width=854) (actual time=20,383.785..20,383.787 rows=36 loops=1)

  • Sort Key: (ts_rank(ex.ts_vector_fts, '''guerr'''::tsquery)) DESC
  • Sort Method: top-N heapsort Memory: 28kB
  • Buffers: shared hit=53788 read=22134
3. 4.290 20,367.229 ↓ 2.7 13,848 1

Append (cost=37.36..7,308.18 rows=5,163 width=854) (actual time=365.225..20,367.229 rows=13,848 loops=1)

  • Buffers: shared hit=53788 read=22134
4. 9,881.748 9,928.319 ↓ 2.1 5,543 1

Bitmap Heap Scan on tb_documento_expediente_p_y2017 ex (cost=37.36..4,434.55 rows=2,588 width=854) (actual time=365.224..9,928.319 rows=5,543 loops=1)

  • Recheck Cond: (ts_vector_fts @@ '''guerr'''::tsquery)
  • Filter: ((dt_protocolo_central >= '2016-01-01 00:00:00'::timestamp without time zone) AND (dt_protocolo_central <= '2020-12-31 00:00:00'::timestamp without time zone))
  • Rows Removed by Filter: 3668
  • Heap Blocks: exact=8541
  • Buffers: shared hit=21711 read=10961
5. 46.571 46.571 ↓ 2.3 9,211 1

Bitmap Index Scan on tb_documento_expediente_p_y2017_ts_vector_fts_idx (cost=0.00..36.71 rows=4,014 width=0) (actual time=46.571..46.571 rows=9,211 loops=1)

  • Index Cond: (ts_vector_fts @@ '''guerr'''::tsquery)
  • Buffers: shared hit=2 read=6
6. 10,360.900 10,434.620 ↓ 3.2 8,305 1

Bitmap Heap Scan on tb_documento_expediente_p_y2020 ex_1 (cost=25.46..2,847.82 rows=2,575 width=854) (actual time=95.128..10,434.620 rows=8,305 loops=1)

  • Recheck Cond: (ts_vector_fts @@ '''guerr'''::tsquery)
  • Filter: ((dt_protocolo_central >= '2016-01-01 00:00:00'::timestamp without time zone) AND (dt_protocolo_central <= '2020-12-31 00:00:00'::timestamp without time zone))
  • Heap Blocks: exact=7566
  • Buffers: shared hit=32077 read=11173
7. 73.720 73.720 ↓ 3.2 8,305 1

Bitmap Index Scan on tb_documento_expediente_p_y2020_ts_vector_fts_idx (cost=0.00..24.81 rows=2,575 width=0) (actual time=73.720..73.720 rows=8,305 loops=1)

  • Index Cond: (ts_vector_fts @@ '''guerr'''::tsquery)
  • Buffers: shared hit=2 read=6
Planning time : 0.822 ms
Execution time : 20,384.016 ms