Home » Developer & Programmer » Precompilers, OCI & OCCI » Pro*C slower than SQL*Plus ?
Pro*C slower than SQL*Plus ? [message #138969] Mon, 26 September 2005 02:01
proc_edi
Messages: 1
Registered: September 2005
Junior Member
Hi,
I use Oracle 8.1.6 Pro*C from a Tru64 unix system to connect to the database (Oracle 8i) running on the same system.
I have a C program that accepts input and inturn calls a function generated by the the pro*C compiler. The .pc file contains couple of functions which inturn makes EXEC calls to open a cursor, fetch from the cursor and close the cursor.
Now, when I run my program, I see a huge delay in the processing. However, the equivalent query ran very fast (in few seconds) in SQL*Plus.
So, I added log statements in the .c file (pro*c generated) to time the open and fetch cursor operations. Especially, I timed the sqlbuft and sqlcxt functions (pro*c internal)and saw that these functions take a lot of time to open the cursor.
In the .pc file where I do the open cursor, I have mentioned the same "where" clause filter that I specified in SQL*Plus.

I did some search in OraFaq site and figured that Pro*C internally uses UPI.
So, I would like to know if there are any known performance issues with Pro*C (oracle 8.1.6) in opening a cursor ?
Also, I would like to use the same code to connect to both Oracle 8i and Oracle 10g databases. To ensure good performance, is it advisable to move to OCI instead of Pro*C ?

Kindly help.

Regards,
Venkat

p.s We have 40,000 entries in the database table that Pro*C connects to.
SQL*Plus takes 10 secs while Pro*C takes 5minutes to fetch the same result.
Previous Topic: Using Visual Basic DLL Within Oracle
Next Topic: flat files to oracle tables using pro* c
Goto Forum:
  


Current Time: Mon Jul 13 13:38:21 CDT 2020