: Database-internal statistics are very important for cost-based query optimizers. Only if an optimizer has accurate statistical information about data, it provides excellent execution plans for queries; if those statistics are out of date, then queries will be badly optimized and performance suffers. Unfortunately, a lot of database systems currently do not manage statistics adequately; they only offer means to let statistics be calculated, but it is up to the user to decide when to initiate the calculation. In fact, this is a critical task because the calculation takes some minutes and should only be done if really necessary. We present an effective approach that shifts the responsibility for managing the calculation of database statistics from the database system to applications. We show that aspect-orientation helps us to provide some automatic mechanism that concentrates the logic in one single aspect. This aspect decides for any application individually when to initiate a calcula...