Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transactions? #1

Open
astro opened this issue Jun 30, 2010 · 3 comments
Open

Transactions? #1

astro opened this issue Jun 30, 2010 · 3 comments

Comments

@astro
Copy link

astro commented Jun 30, 2010

I'm experiencing very low INSERT performance. http://www.sqlite.org/speed.html advises to use transactions.

db.query("BEGIN; INSERT ...; INSERT ...; INSERT ...; COMMIT;", [], function() { }); doesn't work. Passing the SQL queries as individual serial queries doesn't work either. Any alternative to query()?

@orlandov
Copy link
Owner

orlandov commented Jul 1, 2010

Yeah there's a lot that needs to be optimized there... I'd recommend using the low level node bindings. Prepare your own statements, bind your placeholder variables and then step through them as necessary. Have a look in sqlite.js for how to do this, it's not too difficult.

@Pita
Copy link

Pita commented May 30, 2011

I wanna do the same as @astro

@Pita
Copy link

Pita commented May 30, 2011

I tried to insert multiple rows with one insert. That creates issue #32 :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants