Hello,
I am new to perl and work on sample scripts as base for my problem.
But like to solve a problem concerning database issues.
Please hint me to an advanced mailing list, if this list is the wrong
place.
I don't know, how the memory management works. But my script consumes
about 500 MB !
This is because I have to fill ca. 400 K lines of data into a database.
The script dies after 27 K of that lines.
Tests with some data works. When the data comes from a extra file, can I
then handle this amount of data ?
Thanks
Lothar Behrens
The part of code that inserts the data is like this:
while (<DATA>)
{
chomp;
my(@field) = split(/\;/, $_);
# Note the single quotes in the varchar fields.
$sql = "if not exists (select KUNDENNUMMER from $tableName where
KUNDENNUMMER = '$field[0]') insert into \
$tableName (KUNDENNUMMER) values ('$field[0]')";
# $sth = $dbh -> prepare($sql) || die("Can't prepare statement:
$DBI::errstr");
# $rc = $sth->execute() || die("Can't execute statement:
$DBI::errstr");
$rc = $dbh->do($sql) || die("Can't execute statement:
$DBI::errstr");
$rc = $dbh->commit() || die("Can't commit data: $DBI::errstr");
}
...
__END__
111111
222222
333333
444444
......
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]