How can I get jdbc timing information? - Weblogic

This is a discussion on How can I get jdbc timing information? - Weblogic ; Hi, We'd like to extract some timing information about our jdbc calls, i.e. this query took this long. We're using several different sql frameworks because the codebase is a huge, old legacy beast and everyone's thrown another lick of paint ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: How can I get jdbc timing information?

  1. How can I get jdbc timing information?

    Hi,

    We'd like to extract some timing information about our jdbc calls, i.e. this query took this long. We're using several different sql frameworks because the codebase is a huge, old legacy beast and everyone's thrown another lick of paint on at some stage. Hopefully we might get a chance to clean it up, but we want to see where the framework bottlenecks are, and we want to do it from the java side for that reason, as opposed to the database side. Also we don't control the database and it'll just be quicker to do it this way.

    We're looking for a "wrapper" solution, i.e. somehow just filtering all of our jdbc calls through some class to take start and end point times. This is obviously so that we don't have to modify all our existing calling code.

    FYI, we're using WLS 8.1 and the drivers are the 10g Oracle ones, e.g. oracle.jdbc.xa.client.OracleXADataSource and oracle.jdbc.driver.OracleDriver.

    Has anyone done this? Any suggestions? Any more information you need?
    cheers,
    Ian

  2. Re: How can I get jdbc timing information?



    Ian McIntosh wrote:

    > Hi,
    >
    > We'd like to extract some timing information about our jdbc calls, i.e. this query took this long. We're using several different sql frameworks because the codebase is a huge, old legacy beast and everyone's thrown another lick of paint on at some stage. Hopefully we might get a chance to clean it up, but we want to see where the framework bottlenecks are, and we want to do it from the java side for that reason, as opposed to the database side. Also we don't control the database and it'll just be quicker to do it this way.
    >
    > We're looking for a "wrapper" solution, i.e. somehow just filtering all of our jdbc calls through some class to take start and end point times. This is obviously so that we don't have to modify all our existing calling code.
    >
    > FYI, we're using WLS 8.1 and the drivers are the 10g Oracle ones, e.g. oracle.jdbc.xa.client.OracleXADataSource and oracle.jdbc.driver.OracleDriver.
    >
    > Has anyone done this? Any suggestions? Any more information you need?
    > cheers,
    > Ian


    Hi. Look into the setJDBCSQL(boolean enable) method of the weblogic.management.configuration.ServerDebugMBean .
    If you can set it to true, our pool object wrappers will log (a lot), hopefully including the time, when a JDBC
    method is called and when it returns.
    Joe


  3. Re: How can I get jdbc timing information?



    Ian McIntosh wrote:

    > Hi,
    >
    > We'd like to extract some timing information about our jdbc calls, i.e. this query took this long. We're using several different sql frameworks because the codebase is a huge, old legacy beast and everyone's thrown another lick of paint on at some stage. Hopefully we might get a chance to clean it up, but we want to see where the framework bottlenecks are, and we want to do it from the java side for that reason, as opposed to the database side. Also we don't control the database and it'll just be quicker to do it this way.
    >
    > We're looking for a "wrapper" solution, i.e. somehow just filtering all of our jdbc calls through some class to take start and end point times. This is obviously so that we don't have to modify all our existing calling code.
    >
    > FYI, we're using WLS 8.1 and the drivers are the 10g Oracle ones, e.g. oracle.jdbc.xa.client.OracleXADataSource and oracle.jdbc.driver.OracleDriver.
    >
    > Has anyone done this? Any suggestions? Any more information you need?
    > cheers,
    > Ian


    Oh, and another option exists if you're willing to use the weblogic.jdbc drivers. We have a
    wrapper which will log everything at the driver level for these drivers, including every
    JDBC method call and return, with the timestamp. This data will go to a file of your choice.
    Joe


  4. Re: How can I get jdbc timing information?

    Great, that second option sounds like exactly what we need. (I've been trying out the first, but can't see any timing info).

    Can you give me details on where I get this wrapper class and how to use it?
    cheers,
    Ian

  5. Re: How can I get jdbc timing information?



    Ian McIntosh wrote:

    > Great, that second option sounds like exactly what we need. (I've been trying out the first, but can't see any timing info).
    >
    > Can you give me details on where I get this wrapper class and how to use it?
    > cheers,
    > Ian


    See our JDBC documents on using the "spy" logger:

    http://e-docs.bea.com/wls/docs81/jdbc_drivers/spy.html

    Let me know if you have any trouble configuring it.
    Joe


  6. Re: How can I get jdbc timing information?

    According to your documentation, the spy logger only works with Weblogic drivers, not Oracle drivers.

  7. Re: How can I get jdbc timing information?



    Ian McIntosh wrote:

    > According to your documentation, the spy logger only works with Weblogic drivers, not Oracle drivers.


    Correct. As I said, you would have to run with the
    weblogic driver for oracle for the spy logger to work.


  8. Re: How can I get jdbc timing information?

    "Ian McIntosh" wrote in message news:194777.1104811365904.JavaMail.root@jserv5...
    > We'd like to extract some timing information about our jdbc calls, i.e. this query took this long. We're using several different

    sql frameworks because the codebase is a huge, old legacy beast and everyone's thrown another lick of paint on at some stage.
    Hopefully we might get a chance to clean it up, but we want to see where the framework bottlenecks are, and we want to do it from
    the java side for that reason, as opposed to the database side. Also we don't control the database and it'll just be quicker to do
    it this way.
    >
    > We're looking for a "wrapper" solution, i.e. somehow just filtering all of our jdbc calls through some class to take start and end

    point times. This is obviously so that we don't have to modify all our existing calling code.
    >
    > FYI, we're using WLS 8.1 and the drivers are the 10g Oracle ones, e.g. oracle.jdbc.xa.client.OracleXADataSource and

    oracle.jdbc.driver.OracleDriver.
    >
    > Has anyone done this? Any suggestions? Any more information you need?
    > cheers,



    You may want to use any generic Java profiler like JProbe
    OptimizeIT or JProfiler - they all let you drill down to a
    particular line of code consuming most of the time. If
    you want to concentrate on a particular framework package
    they allow to filter them.

    That's not exactly what you asked for, but it's a best practice
    to approach performance problems.

    Regards,

    Slava Imeshev



+ Reply to Thread