Patent attributes
The subject technology creates partitions based on changes to a table, at least one of the one or more partitions overlapping with respect to values of one or more attributes with at least one of another partition and a previous partition. The subject technology maintains states for the partitions, each state from the plurality of states representing a particular degree of clustering of the table. The subject technology determines a number of overlapping partitions and a depth of the overlapping partitions, and determines a clustering ratio based at least in part on the number of overlapping partitions and the depth. The subject technology reclusters partitions of the table to increase the clustering ratio, the clustering ratio determined by at least a proportion of rows in a layout of the table that satisfy an ordering criteria based at least in part a particular attribute of the one or more attributes.