On Tue 28 May 2002 14:30, Tim Bunce <[EMAIL PROTECTED]> wrote:
> On Tue, May 28, 2002 at 09:20:18AM +0200, H.Merijn Brand wrote:
> > On Tue 28 May 2002 00:19, Tim Bunce <[EMAIL PROTECTED]> wrote:
> > > Given this code:
> > >
> > > my $dbh = DBI->connect("dbi:ExampleP:", '', '', {
> > > Profile => 1 # <=== NEW
> > > });
> > > my $sth = $dbh->prepare("select mode,size,name from ?");
> > > $sth->execute(".");
> > > while ( my $hash = $sth->fetchrow_hashref ) {
> > > }
> > > exit 0;
> > >
> > > [snip]
> > >
> > > Any questions/comments?
> >
> > Lovely. Very useful. Hope to be able to extend DBD::Unify to meet what 1.23
> > offers soon. Time's short however.
> >
> > Could you consider promoting my support for DBD backend debugging to DBI?
> >
> > my $dbh = DBI->connect ("dbi:ExampleP:", "", "", {
> > Profile => 1, # <=== NEW
> > DBDverbose => 9, # Backend debugging
> > });
> >
> > In DBD::Unify it shows what is happening behind the scenes. I know that Oracle
> > has support for dumping all SQL backend communications to a file, including
> > optimization actions and such, but DBDverbose controls debug statements in
> > dbdimp.c These probably aint very informative for the end user that just want
> > to retreive records, but for those that want to squeeze the last drop of
> > performance out of the available DBD, it provides a welth of information.
>
> The existing trace level mechanism is specifically meant for that.
> >From the docs:
>
> Trace levels are as follows:
>
> 0 - Trace disabled.
> 1 - Trace DBI method calls returning with results or errors.
> 2 - Trace method entry with parameters and returning with results.
> 3 - As above, adding some high-level information from the driver
> and some internal information from the DBI.
> 4 - As above, adding more detailed information from the driver.
> Also includes DBI mutex information when using threaded Perl.
> 5 and above - As above but with more and more obscure information.
>
> For example, DBD::Oracle shows progressively more information from
> trace level 3 upwards. At level 9 where it shows every OCI API
> function call with parameters and results.
I know, but there is no way to suppress the DBI messages. Sometimes (I know a
DBD author deals with other problems than a DBI user) I want to see *ONLY* the
DBD messages. That's what DBDverbose is for.
> Tim.
--
H.Merijn Brand Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using perl-5.6.1, 5.7.3 & 631 on HP-UX 10.20 & 11.00, AIX 4.2, AIX 4.3,
WinNT 4, Win2K pro & WinCE 2.11 often with Tk800.024 &/| DBD-Unify
ftp://ftp.funet.fi/pub/languages/perl/CPAN/authors/id/H/HM/HMBRAND/