Hi,

I've been trying to optimize repetitive insertions into one of my H2
database, using jruby + sequel.

One recently found option was to use prepared statements in H2. As I
did not know how to do so with sequel, I went down to the lowest jdbc
API possible and managed to make it work yesterday.

I gained a lost in terms of speed of execution in production, as
expected, but at the same time somehow I lost all the nice DSL from
sequel. I am willing to compromise some of this speed if I can get it
coded using sequel.

I posted a small jruby snippet at http://pastie.org/3705530. This is
not my production code, but a simpler testcase. It just creates a H2
db, add few records using std statement, and then a prepared statement
to delete based on id parameter. How would this be coded using pure
sequel ?

I've been trying to read
http://sequel.rubyforge.org/rdoc/files/doc/prepared_statements_rdoc.html,
but could not understand how this would work, especially in my
production case where one of my prepared statement has ~30+ values to
be inserted into a table. Please note that the small pastie does not
reflect that (just 1 input parameter).

I will try in parallel more experiments (like naming all my 30+
values, which is not my preference...).

Thanks in advance.

-- 
Christian

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-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/sequel-talk?hl=en.

Reply via email to