SQLite3-ruby extremely slow under 1.9.1?
Posted
by NilObject
on Stack Overflow
See other posts from Stack Overflow
or by NilObject
Published on 2010-04-05T06:19:29Z
Indexed on
2010/04/05
6:23 UTC
Read the original article
Hit count: 601
I decided to upgrade my server to Ruby 1.9.1, and a lot of things are indeed much faster. However, I have a process that dumps a database to sqlite, and it's become glacially slow. What used to take 30 seconds now takes upwards of 10 minutes.
The code does several create table statements, and then lots of inserts. The insert statements nearly all use placeholders (?), so SQLite is doing the heavy lifting of binding the parameters. In short, I can't see why this particular usage has slowed down so much.
Does anyone know of any problems that have caused it? I'm using sqlite3-ruby (1.2.5), and I'm hoping that someone has encountered this and profiled it. If not, I guess I'm going to learn how to profile ruby code :)
© Stack Overflow or respective owner