Oil and gas refineries play a key role in the economies of countries by providing energy to various industrial sectors. A lack of an integrated efficiency analysis procedure, in many industries, could significantly impact the planning of sustainable industrial structures and operations. It also can influence company performance and competitiveness, and, eventually, negatively compromise the fuel supply process. All these problems taken together might negatively impact the environment and sustainable practices. Studies of efficiency in the oil industry can help to reduce its environmental and social impact and to achieve long-term green transition goals. In this work, the data envelopment analysis (DEA) method was used to present improvement goals for production units, based on efficiency indexes. Furthermore, the DEA window analysis model, integrated with the Malmquist index and cluster analysis, was used to evaluate efficiency and the factors that explain the differences between refineries in a number of timeframes. A numerical analysis was carried out with data collected from 12 Brazilian oil refineries between 2012 and 2020, using DEA window analysis, cluster analysis, and the Malmquist index.