From: "Ara.T.Howard" Date: 2004-07-02T03:32:50+09:00 Subject: Re: [ANN] SQLite-Ruby 1.2.0 On Fri, 2 Jul 2004, Jamis Buck wrote: > Yup. Just do > > db.use_arrayfields = false > > Where 'db' is your open database instance. very cool. my tests show about 2/3 the memusage by using arrayfields on a table with 50000 rows. the access is slower since there are two method calls instead of one, of course, but it's not significant. and of course code like this: tuples.each do |t| puts t.join(',') end is much faster since otherwise you'd be doing something like: ikeys = tuples.first.keys.select{|k| Numeric === k}.sort tuples.each do |t| puts(t.values_at(*ikeys).join(',')) end which invloves an extra object creation, array explosion, and method call per tuple. if i re-wrote arrayfields in C it'd probably be better/same for all aspects including lookup speed... thanks for effort and quick turn-around jamis! -a -- =============================================================================== | EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov | PHONE :: 303.497.6469 | A flower falls, even though we love it; | and a weed grows, even though we do not love it. | --Dogen ===============================================================================