On May 10, 10:41 am, Jian Lin <[email protected]> wrote: > Gary Doades wrote: > etc... so the final result is 34000 entry hashes, mapping to > frequencies and word counts. > > the hardware should be pretty good... it is the HP TouchSmart IQ804... > with a Core 2 Duo and hard drive ST3320820AS which is 7200rpm, 8MB > buffer. > > hm... makes me wonder if the db is just 4MB, how come the hard drive > buffer 8MB didn't totally handled it in its RAM and be super fast. did > it actually force write to the physical disc?
It's never that simple (and yes under the appropriate circumstances the drive is supposed to flush to the actual disk). For example there's a constant amount of overhead with each query: network latency etc. not a huge amount (probably less than a millisecond), but multiply that by 34000 and it will add up. If you really need to manipulate this much data you'd be well advised to do the inserts in bulk. Fred > > -- > Posted viahttp://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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

