Optimized SelectAtomicIntConst to directly return PTable instead of vector of IDs