in reply to Mass inserts with SQLite + CSV + execute_array?

... If anyone has speed suggestions, i'd still like to hear 'em though.

I asked a similar question recently. Check out this node, Loading bulk data into SQLite, and its replies for some suggestions on the speed issue.

  • Comment on Re: Mass inserts with SQLite + CSV + execute_array?

Replies are listed 'Best First'.
Re^2: Mass inserts with SQLite + CSV + execute_array?
by Xenofur (Monk) on Dec 15, 2008 at 06:12 UTC
    Thanks for that, while most of the findings there are the same as mine, there's still the point about indexes. And i found out in "SQLite Administrator" that, while the orderid was a primary key, there was no index on it. Maybe that's because i created it like this: "orderid INTEGER PRIMARY KEY UNIQUE NOT NULL," instead of setting it explicitly to primary in the last line of the create query.

    Edit: Huh, this is weird. Neither way of creation actually creates an index... What's wrong with this query?
    CREATE TABLE IF NOT EXISTS moo3 ( orderid INTEGER PRIMARY KEY NOT NULL, volume INTEGER NOT NULL, price REAL NOT NULL )