Why does running OPTIMIZE not always improve Delta table performance?

dataumer
New Contributor

After running OPTIMIZE on a large Delta table, the number of files may reduce significantly, but the actual query execution time does not improve much.

What could be the reason for this?

How do we determine whether the performance issue is related to file sizes, poor data skipping, inefficient joins or the choice of clustering columns?

Is there a recommended way to measure the actual benefit of running OPTIMIZE?