create table stuff ( proto char(4), src_ip char(15), etc.... drp_packets int, index(proto), index(src_ip), etc.... ) load data local infile '/blah/blah.dat' into table stuff select sum(packets) where src_ip = 1.2.3.4 and .....