2 Replies Latest reply on Jun 14, 2004 7:33 PM by gorano

    Declared sql runs slowly

    veranda Newbie

      Under JBoss the declared sql, wich is a simle joined select, the query runs 15 - 20 times slowler, than the same query from plsql.

      Is it normal? What can I do to make it faster?

      Thanks in advance.

      veranda

        • 1. Re: Declared sql runs slowly
          treespace Novice

          To confirm the performance loss, I would execute the same query using the same driver using JUnit or from a simple Java main method. Unlikely to be a JBoss problem per se. PL/SQL will be faster, but no an order of magnitude faster.

          • 2. Re: Declared sql runs slowly
            gorano Newbie

            What is the total query time in the 2 examples given?

            You will have an overhead from java compared to
            plsql before the actual query is processed on the DB and after the query is finished and the result is transfered back to your application. For very small queries you could end up with this result. If the query is more heavy you shouldn't notice the difference.

            /G