using partition to improve performance.