speed optimization in case unique is not enabled (default setting)