Hack to get seq_scan / idx_scan query to work properly