Improve memory usage with large tables.