explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7QQo : Optimization for: test; plan #6ccm

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 80,031.169 83,211.866 ↑ 21.0 1 1

Bitmap Heap Scan on documents (cost=3,263.64..280,123.51 rows=21 width=714) (actual time=41,635.534..83,211.866 rows=1 loops=1)

  • Recheck Cond: ($0 && sys_readers)
  • Filter: (ver_islast AND (sys_status IS DISTINCT FROM 'deleted_by_retention'::text) AND (sys_type = 'gser_factura_isubill'::text) AND (sys_source_id ~~* '%010709789825%'::text))
  • Rows Removed by Filter: 25,843,506
  • Heap Blocks: exact=393,155 lossy=4,135,856
2.          

Initplan (for Bitmap Heap Scan)

3. 0.019 0.019 ↑ 1.0 1 1

Index Scan using users_pkey on users (cost=0.14..2.36 rows=1 width=32) (actual time=0.019..0.019 rows=1 loops=1)

  • Index Cond: ((userid)::text = current_setting('my.username'::text))
4. 3,180.678 3,180.678 ↓ 99.7 25,843,507 1

Bitmap Index Scan on documents_sys_readers_idx (cost=0.00..3,261.27 rows=259,130 width=0) (actual time=3,180.678..3,180.678 rows=25,843,507 loops=1)

  • Index Cond: ($0 && sys_readers)
Planning time : 0.260 ms
Execution time : 83,223.642 ms