in reply to very slow processing

thank you so much guys ,specially ronW .taking your cue ,i just sweeped thru the file once capturing the 3 datas pushing it into a hash with id as key.it takes few seconds now .