Esteemed monks,
Is it possible to do a FORALL INSERT from Perl? I've tried writing a procedure, but binding my arrayref of arrayrefs fails. Also, from reading this:
Returning A Recordset ^
DBD::Oracle does not currently support binding a PL/SQL table (aka array) as an IN OUT parameter to any Perl data structure. You cannot therefore call a PL/SQL function or procedure from DBI that uses a non-atomic data type as either a parameter, or a return value. However, if you are using Oracle 9.0.1 or later, you can make use of table (or pipelined) functions.
To the best of my understanding, a FORALL-style INSERT requires binding a PL/SQL table - and this is impossible? Or have I misunderstood something here?
How do others insert massive amounts of data to Oracle tables? The constraints are that
- The app needs the generated IDs afterwards.
- Table must be fully available during insert.
- There may be several processes inserting into the same table at the same time.
I'm currently attempting execute_array, and that doesn't give very much improvement - maybe 5%. Before I decide that the app needs more IO, implementing FORALL INSERT is a prerequisite. So, any help is greatly appreciated!
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.