Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #14782

Re: Extract String and StringBuffer

From Martin Gregorie <martin@address-in-sig.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Extract String and StringBuffer
Date 2012-05-24 20:29 +0000
Organization UK Free Software Network
Message-ID <jpm5mg$pq8$1@localhost.localdomain> (permalink)
References <34c76a08-4bdb-462b-9178-c8a24d9a5dba@googlegroups.com> <fuudnas749CBZCDSnZ2dnUVZ8h2dnZ2d@giganews.com> <54c296d1-7913-45f0-b1f1-a602a0c34cbf@googlegroups.com>

Show all headers | View raw


On Thu, 24 May 2012 03:21:46 -0700, mikew01 wrote:

> The requirement is to pull out the sql statements and profile them using
> the Oracle explain plan which will be executed by Sonar.
>
Has time I had to do that I was able to use ODBC tracing facilities to 
capture SQL statements as they were executed, but that was a while ago 
and I can't recall whether all ODBC implementations had that ability or 
was a capability of the particular driver I was using.

Of course, using this approach does rather assume that you have a 
regression test that is known to exercise all SQL statements and/or there 
is somebody who knows enough about the system to be able to reliably run 
them all. 

If this is part of a DB tuning exercise you should be aware that you'll 
need to run the complete set of statements more than once, so it would be 
worthwhile to build a set of scripts that can can be used to (a) re-
capture the set of scripts and (b) run them and record performance data 
for analysis.

There's one other vital bit of information you need too - a use frequency 
for each SQL statement. If you don't have this information it would be 
well worth instrumenting your system to capture it. DB tuning is a really 
good example of a place where the 80/20 rule applies: unless a piece of 
SQL isn't in the top 20% of most frequently run statements there's little 
point in optimising the DB for it unless its something quite unusual, 
e.g. the CEO uses it once a day/week/month or it is run once a night, is 
tooth-achingly slow, accesses most of the DB and tends to run longer than 
the quiet period its meant to complete its task in.


-- 
martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Extract String and StringBuffer mikew01 <mikew01@blueyonder.co.uk> - 2012-05-24 01:29 -0700
  Re: Extract String and StringBuffer Leif Roar Moldskred <leifm@dimnakorr.com> - 2012-05-24 04:02 -0500
    Re: Extract String and StringBuffer mikew01 <mikew01@blueyonder.co.uk> - 2012-05-24 03:21 -0700
      Re: Extract String and StringBuffer markspace <-@.> - 2012-05-24 08:21 -0700
        Re: Extract String and StringBuffer Roedy Green <see_website@mindprod.com.invalid> - 2012-05-28 09:28 -0700
          Re: Extract String and StringBuffer markspace <-@.> - 2012-05-28 12:19 -0700
      Re: Extract String and StringBuffer Robert Klemme <shortcutter@googlemail.com> - 2012-05-24 08:20 -0700
        Re: Extract String and StringBuffer markspace <-@.> - 2012-05-24 08:47 -0700
          Re: Extract String and StringBuffer Lew <lewbloch@gmail.com> - 2012-05-24 09:52 -0700
      Re: Extract String and StringBuffer Martin Gregorie <martin@address-in-sig.invalid> - 2012-05-24 20:29 +0000
  Re: Extract String and StringBuffer Roedy Green <see_website@mindprod.com.invalid> - 2012-05-28 09:29 -0700

csiph-web