Query optimization is an important task of Relational Database Management Systems. A typical query optimizer estimates the cost of various execution plans for a given query, and selects the one with the lowest cost. The accuracy of cost estimation is crucial in that it directly affects the quality of the decisions made by query optimizers. Seletivity estimation is an important part of cost estimation. Many commercial DBMSs maintain histograms to summarize the contents of relations in order to perform efficient selectivity estimations. In this book, we review the various existing histogram techniques, and propose two new types of histograms: the piecewise linear histogram and the A- Optimal histogram. Experiements show that they perform better than existing histogram in many cases. We also consider the problem of building global histograms. By adaptively allocate the given storage space to individual histograms according to their skewness, we can reduce the overall estimation error. Finally, we address the dynamic maintenance of histograms, and propose an efficient maintenance method for the piecewise linear histogram based on the probabilistic counting technique.