Home » Developer & Programmer » Precompilers, OCI & OCCI » Opinions sought: Pro*C v's sqlplus
Opinions sought: Pro*C v's sqlplus [message #207630] Wed, 06 December 2006 05:27 Go to next message
clancypc
Messages: 35
Registered: December 2006
Member
I currently have a file of sql commands (all inserts and updates) that I execute by piping it through sqlplus. I was wondering if it would be any faster if I wrote a Pro*C program to read in the file execute the commands that way.
Does anybody have an opinion or experience of this?
Thanks
Pete
Re: Opinions sought: Pro*C v's sqlplus [message #207741 is a reply to message #207630] Wed, 06 December 2006 18:08 Go to previous messageGo to next message
Admin@Lightsql.Com
Messages: 36
Registered: November 2006
Member

Pete,

It depends what you do in sqlplus. Mostly, In Pro*c, you will again embed the same sqls and execute. By moving to Pro*c, you will save little performance, but Pro*C maintenance is a hassle. If you do lot of calculations in between the sql fetch, that may reduce some timing if you convert into c.

Jay
Fun Programming with Oracle & Visual C++, Author of http://www.lightsql.com.
Re: Opinions sought: Pro*C v's sqlplus [message #207852 is a reply to message #207630] Thu, 07 December 2006 03:39 Go to previous messageGo to next message
clancypc
Messages: 35
Registered: December 2006
Member
There are no calculations, the file is just a series of insert and update commands to be executed. At the moment I just pipe the file through sqlplus and each command gets executed sequentially. I was wondering if it would be faster doing it via a Pro*C program? Maybe have the main program read in each command from the file and open the connection to the database then have threads to run the actual commands. That way I could have multiple commands executing in parallel instead of each one serially.
Re: Opinions sought: Pro*C v's sqlplus [message #208233 is a reply to message #207852] Fri, 08 December 2006 14:07 Go to previous message
Admin@Lightsql.Com
Messages: 36
Registered: November 2006
Member

Pete,

Multiple logins always slow. I would suggest look at other options of reducing multiple logins using sqlplus, plsql, execute immediate etc and if nothing works out, you can try Pro*C.

The performance will improve, but not considerable amount.
Maintenance is an issue, if you need to debug or modify.

Jay
Fun Programming with Oracle & Visual C++, Author of http://www.lightsql.com.
Previous Topic: migrate from oracle 7.3.4 to oracle 9i or 10g
Next Topic: INTERNAL ERROR: Failed Assertion [[Code=40701]]
Goto Forum:
  


Current Time: Sun Dec 04 20:48:26 CST 2016

Total time taken to generate the page: 0.08424 seconds