List:MaxDB« Previous MessageNext Message »
From:Gert Wohlgemuth Date:July 30 2003 4:10pm
Subject:RE: many inserts
View as plain text  
Many thanks for the Answer and I using at the moment prepared statements
in java and my autocommit is off. So I need help with the Parameter
Settings like Cache Size and so on.


Cheers Gert


> -----Original Message-----
> From: Flessner, Falko [mailto:falko.flessner@stripped] 
> Sent: Wednesday, July 30, 2003 4:56 PM
> To: Gert Wohlgemuth; sapdb.general@stripped
> Subject: RE: many inserts
> 
> 
> Hi,
> 
> your question has been asked many times before, therefor I 
> will only give a small overview of how to tune mass-inserts.
> 
> You may want to search the archive of this list at 
> http://www.sapdb.org/7.4/sap_db_mailinglist.ht> m
> 
> There are 
> two common usable ways to speed up inserts:
> 
> - 
> Bundle many INSERTs into one transaction:
> Interfaces (JDBC, DBI, ODBC...) usualy turn on AUTOCOMMIT by 
> default. This means, that for every insert your Harddisks 
> need to be accessed to make sure that the data is available 
> after a crash. By triggering a COMMIT manually and grouping 
> many inserts in it, this will reduce I/O-load and therefor 
> speed up your inserts.
> 
> - Make use of "prepared statements":
> IIRC, all DB-Interfaces support "prepared statements". SAP DB 
> spends a lot of time in parsing SQL statements. Prepared 
> statements need to be parsed for only one time and will be 
> feed with variable data later, as done in this perl-example:
> 
> #################################################
> $sth = $dbh->prepare("INSERT INTO table (field) VALUES (?)");
> 
> foreach my $field (@list) {
>         $sth->execute($field);
> }
> #################################################
> 
> For further informations take a close look at the 
> documentation of your Interface.
> 
> Regards,
> 
>     falko
> 
> Original from: Wohlgemuth@stripped
> > A realy newbie question,
> > I using sapdb 7.4 and write a algorythm to analyse 
> statistical datasets. 
> > How can I tune the database for many inserts and also many selects. 
> > The database shoud have over 3 Million entrys per Table. 
> > Do you know some papers about sapdb database tuning? 
> 
> --
> Falko Flessner
> SAP Labs Berlin
> SAP AG            visit http://www.sapdb.org
> 

Thread
many insertsGert Wohlgemuth30 Jul
RE: many insertsFalko Flessner30 Jul
RE: many insertsGert Wohlgemuth30 Jul
RE: many insertsDaniel Dittmar30 Jul