1. In a database system, a method of maintaining a histogram comprising a plurality of buckets, comprising the steps of: gathering query feedback records from a query execution engine; and adding new buckets to said histogram according to a principle of maximum entropy.