I have tried small ruby program like require ''rubygems'' require ''postgres'' db = PGconn.connect(''localhost'', 5432, '''', '''', ''prdjnj'',''postgres'', ''postgres'') res=db.exec("select * from users limit 300000") res.clear puts "After clear result object" a=1 while a!=2 end Before running this program,Initial free memory is 640MB The query("select * from users limit 300000") execution taken the time is upto 110MB when i run this program .. So free memory is reduced from 640MB to 530MB..Now used memory is 110MB that released after the execution of the query ie program reached the while conditions I have followed same scenario in Rail''s active_record instead of PGconn.. @users=User.all(:limit=>300000) @users.clear puts "After clear result object" Here Used memory is not released even after execute the query and clear resulting object..Memory is released well when i use PGconn.. but its not working in active_record Please instruct me how to release used memory in Rail''s active_record -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.