Re: Which is faster (stored procedure or insert statement)?
Posted in 2003
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues
If the table you are importing into has constraints (primary key, foreign key, unique, not null, etc) an insert cursor will make it more difficult to find offending data in case of a violation because the records are sent to the database engine in groups . Otherwise, an insert cursor is marginally faster. Regards, Fred Pratt On Tuesday 06 May 2003 04:56, Paul Watson wrote: > Use an insert cursor and yes esql should be quicker but only by > a little bit:-) > > Dragan Gajic wrote: > > Hello, > > > > I have an ESQL/C application that parse large files and import data to > > one table (~1500000 records per file). Currently I have one stored > > procedure that do insert (for each parsed record I call that procedure > > from ESQL/C with execute procedure statement). Would it be faster to > > do that without stored procedure, with insert statement from ESQL/C? > > (Informix 9.21 on HP-UX 11.0) > > > > Regards, > > Dragan Gajic -- ------------------------------------- Regards, Fred Pratt MicroBeef Technologies PO Box 9262 Amarillo, TX 79105 phone 806 372 2369 fax 806 378 5556 email prattf@tcac.net url http://www.microbeef.com "Open the pod bay door please, HAL."