Ben Matasar
Rails migrations, SQLite3, and largish data
For the Bus Project, I'm building a walklist app and I'm using rails. I decided to build things using rails migrations, and I'm finding them painfully slow with my SQLite3 database that has ~400k voters in it and ~1200 block captains. Overall though, it's good to be writing ruby again.
Some things to keep in mind when dealing with large databases and SQLite3:
- Wrap things into transactions. SQLite is very slow at doing individual inserts, because it locks and unlocks the file too much.
- Prepared SQL statements are much faster, of course.
- I found ActiveRecord hopelessly slow, so I had to drop into the sqlite3-ruby gem. The FAQ is very helpful.
tech | link | 2006/Mar | comments (0)
Go Bears
The game is just begininng between Cal and NC State. This is the first time Cal has been in the tournament in a few years, and they're a #7 seed. Go Bears! (secret motive for this blog post was to test my first emacs lisp function, add-post-date).
UPDATE: That could've gone better.
life | link | 2006/Mar | comments (0)
Back in the blogging saddle.
It's been ages since I had a blog, but I now have enough projects and enough of a sense of self importance that it's time to go for it.
I converted the baseball-databank data to SQLite format for some other stuff I'm working on, and it's here: SQLite baseball-databank.
baseball | link | 2006/Mar | comments (0)
Ben Matasar ben@matasar.org