My exe takes more time for specied input

My application is coded in C++ and uses pro C to get data from oracle database. My executable file is taking more time to execute for some specified input. Is there any way to check where it spends the maximum time?

tools like gcov or a prprofiler might help.

Chances are it is Oracle-related. Do you know about

EXEC SQL ALTER SESSION SET SQL_TRACE TRUE;

and then getting the output file in the oracle udump directory and running it thru tkprof?