Hallo, why not using the returing clause? $sth->prepare ( "insert into foo (my_id, data) values (my_id_seq.nextval,?) returning my_id into ?" ); $sth->bind_param( 1, "bar"); my $id; $sth->bind_param_inout( 2, \$id, 12); $sth->execute();
Tuesday, September 7, 2004, 4:05:09 AM, Jared wrote: >> my $start_num = $dbh->selectrow_array( "select my_id_seq.nextval from >> dual"); >> my @seq = ( $start_num..100,000 ); # some end number >> >> $sth->prepare ( "insert into foo (my_id, data) values (?,?)" ); >> $sth->bind_param( 1, shift(@seq) ); >> $sth->bind_param( 2, "bar"); >> $sth->execute(); >> JS> the 'select from dual' causes a lot of unnecessary overhead. JS> The original method is most performant. JS> Jared Grüße Wieland mailto:[EMAIL PROTECTED]