1. A method in a computer system of automatically reorganizing a B-tree, the B-tree comprising a plurality of pages, and an amount of data being stored on each page, the method comprising: providing activity statistics for the B-tree; when data is added to or deleted from the B-tree, determining whether the B-tree should be reorganized by analyzing the activity statistics; and when it is determined that the B-tree should be reorganized, computing an optimal amount of data that should be stored on each paged of the B-tree, and reorganizing the B-tree by storing approximately the optimal amount of data on each page of the B-tree.