#9 Could not exclude result/resultset and performance issues

open
Pat
None
7
2013-10-12
2004-08-09
Anonymous
No

I downloaded the newest version today. While I put it
into my system, I found that the "result" could not be
excluded. And I noticed that in the manual, it is said
"result" while in log it's "resultset". So I add
"resultset" to the excluded list. Nothing happens. So I
refer to the source code. Em, I catch it.
In P6ResultSet.java ( I does not use the real code
here, because this box has no source code. :( )
public boolean next() throws SQLException {
// create the string buffer;
// log directly
// return proxyObject.next();
}
Although the sub-class "P6LogResultSet" re-write the
next() method, but it's a wrong way as the following:
public boolean next() throws SQLException {
try {
return super.next();
}
catch ( Exception ex ) {
// log with contriol
}
}

So it's clear where cause the trouble. And in
P6ResultSet.next(), there is a performance issue. Why
not check if log needed first here? Think about a
resultset with over 10K rows and each row has more than
100 columns.

After all, I am glad to see all the SQL's our system
sending to the DBMS. A good job. We can make it better.

Flybean

Discussion

  • Aaron Hamid

    Aaron Hamid - 2007-11-28

    Logged In: YES
    user_id=1290
    Originator: NO

    I also noticed this. It's swamping all my logging, I can't exclude the resultset output.

     
  • Aaron Hamid

    Aaron Hamid - 2007-11-28

    Logged In: YES
    user_id=1290
    Originator: NO

    I should add, to be more specific you can't filter the result set output. It's calling directly into P6LogQuery.log() as opposed to something like logElapsed which will call isLoggable.

     
  • Pat

    Pat - 2009-03-14
    • assigned_to: nobody --> patmoore
     
  • Pat

    Pat - 2009-03-14
    • priority: 5 --> 7
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks