set  enable_bitmapscan to off;

explain analyze select * from sp_op_uct where sp_op_id in 
  (select sp_op_id from sp_op_produkt where bal_zak = 34123) or sp_op_id = 34123;

explain analyze select * from sp_op_uct where sp_op_id in 
  (select sp_op_id from sp_op_produkt where bal_zak = 34123 union all select 34123); 

explain analyze select * from sp_op_uct where sp_op_id in 
  (select sp_op_id from sp_op_produkt where bal_zak = 34123) 
  union all select * from sp_op_uct where sp_op_id = 34123;

set  enable_bitmapscan to on;

explain analyze select * from sp_op_uct where sp_op_id in 
  (select sp_op_id from sp_op_produkt where bal_zak = 34123) or sp_op_id = 34123;

explain analyze select * from sp_op_uct where sp_op_id in 
  (select sp_op_id from sp_op_produkt where bal_zak = 34123 union all select 34123); 

explain analyze select * from sp_op_uct where sp_op_id in 
  (select sp_op_id from sp_op_produkt where bal_zak = 34123) 
  union all select * from sp_op_uct where sp_op_id = 34123;
