INSERT using BIG subquery [message #18592] |
Wed, 06 February 2002 19:11  |
David Raymond
Messages: 1 Registered: February 2002
|
Junior Member |
|
|
Hi,
I have an application which is inserting a 2D array into a table of the form:
ID NUMBER(7)
ROW NUMBER(7)
COL NUMBER(3)
VAL VARCHAR2(100)
Rather than do an INSERT for each row I am trying this method:
insert into MY_TABLE(
select 999, 0, 0, 'A' from DUAL
union select 999, 0, 1, 'B' from dual
union select 999, 1, 0, 'C' from dual
union select 999, 1, 1, 'D' from dual
...
);
It seems to work ok and is quite a lot quicker than individual INSERTS. I have tested it on 6500 rows - no problems. Are there any limits to statement sizes, union sizes etc.. that may affect this approach?
Oracle Version 7.3.2.3.0
thanks
regards
David Raymond
|
|
|
|