Is there a way to combine multiple inserts with the SEQUEL gem without
manually creating the syntax?
Inserting 94,000 rows (Only 3 columns wide) from memory (Pre-fetched from
MySQL in a previous step into a Ruby in-memory array) into oracle in a loop
with DB["insert into foo values (bar)"].insert takes *33 minutes*.
I don't want to go the SQL*Loader route, I'd like to keep it all inside
Ruby if I could.
*Per a stackoverflow page, inserts into oracle can be staged together via
the following syntax:*
INSERT ALL
INTO t (col1, col2, col3) VALUES ('val1_1', 'val1_2', 'val1_3')
INTO t (col1, col2, col3) VALUES ('val2_1', 'val2_2', 'val2_3')
INTO t (col1, col2, col3) VALUES ('val3_1', 'val3_2', 'val3_3')
.
.
.SELECT 1 FROM DUAL;
http://stackoverflow.com/questions/39576/best-way-to-do-multi-row-insert-in-oracle
However, I would like to avoid writing a method to loop over the rows
generating a string of 500 or 1000 rows with the "INSERT ALL" and "SELECT 1
FROM DUAL" above/below it.
Thoughts?
Thanks ahead of time,
Jeremy Swartwood
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.