The massive integration of distributed photovoltaics (PVs) into power grid causes rapid growth of data collection, which has put significant pressure on power line communication (PLC). Edge computing enables efficient data compression on edge-side gateway to reduce data size. However, it still faces challenges such as the coupling between transmission delay and compression delay, as well as the coupling between data compression ratio selection and gateway selection. In this paper, we formulate the information aggregation and data compression problem to minimize the total delay, and develop a delay-aware upper confidence bound (UCB) algorithm. It sets the negative value of delay as the learning reward to achieve delay-aware learning, and jointly optimizes gateway and data compression ratio selection based on upper confidence bound ranking and Karush-Kuhn-Tucker (KKT) conditions. Simulation results demonstrate the superior performance of the proposed algorithm.