Mining the Flow Data for System Optimization