In the presence of distortions, the reallocation of resources towards more valuable parts of the economy, namely allocative efficiency, is fundamental for understanding aggregate outcomes such as aggregate productivity. Nevertheless, allocative efficiency continues to be a black box. We present a theory that allows to structurally dissect allocative efficiency into an arbitrary partition of the economy. For each of these parts, allocative efficiency evolves according to sufficient statistics of factor shares and distortions in any input of the economy. These sufficient statistics are then aggregated according to a new decomposition of Domar weights. We apply our results to revisit growth accounting and use administrative firm-to-firm and tax data for the universe of formal firms to measure the microeconomic drivers of aggregate productivity stagnation in Chile during the 2010 decade. Aggregate productivity stagnation is almost entirely driven by allocative efficiency. Export activity of mining and domestic activity of retail shape the bulk of this stagnation as factors reallocated to less distorted parts of the economy.