Open file while !eof { insert into log_file values (time,value,sql) } #### select * from log_file order by sql