Automatically build database statistics and optimize tables.