Write a program to parse a massive database log file and extract specific query performance metrics without loading the entire file into memory.