Which is faster (stored procedure or insert statement)?
Posted in 2003
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues
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
"Dragan Gajic" <gdraganyu@yahoo.com> wrote in message news:98b9be37.0305050953.179b01a9@posting.google.com... > 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) ESQL/C will be faster by an order of magnitude.
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 -- Paul Watson # Oninit Ltd # Growing old is mandatory Tel: +44 1436 672201 # Growing up is optional Fax: +44 1436 678693 # Mob: +44 7818 003457 # www.oninit.com #