How to use partitioning to improve performance of large tables