Can we configure the Oracle environment or parameters to make PL/SQL to run more efficient?

One of our PL/SQL hang, we copied the sql out from pl/sql and running it in sqlplus, the response time was fine.