[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl
Subject:    Re: RFC: DBI::Prof
From:       Tim Bunce <Tim.Bunce () ig ! co ! uk>
Date:       2000-11-29 12:16:18
[Download RAW message or body]

On Tue, Nov 28, 2000 at 11:44:28PM +0100, Stas Bekman wrote:
> On Tue, 28 Nov 2000, Matt Sergeant wrote:
> 
> > On Wed, 29 Nov 2000, Fabrice Scemama wrote:
> > 
> > > It would be nice if Tim Bunce simply added it as a parameter
> > > to DBI's existing methods. Why not ask him?
> > 
> > I think most people would prefer to see it as a separate module. Generally
> > people do their query optimisations outside of DBI (and Perl), using the
> > database's in-built profilers.
> 
> This one is not about optimizing the database, but finding the missing
> indices mostly and seeing which queries might need to be rewritten to make
> a better use of the driver/db. I don't know how can you do that without
> actually running your application, which means DBI/Perl.
> 
> I suppose that if someone will send a necessary patch to Tim he might put
> it in or not... I'm fine with any of Tim's decisions. 

I've been planning to add some internal stats gathering triggered by a
simple global int (so the cost when turned off would be effectively zero).
Code bloat would also be tiny if done right (far smaller than existing
trace code for example).

Basically just recording a high-res timestamp for the start and end of
a small set of significant events (prepare, execute, fetch first row,
last row, ...) and some very basic reporting if trace is enabled.

Meanwhile I'm happy for people to experiment with the practical issues
in the DBIx::* namespace. Modules could be updated to use the new stats
when they're available.

Tim.

---------------------------------------------------------------------
To unsubscribe, e-mail: modperl-unsubscribe@apache.org
For additional commands, e-mail: modperl-help@apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic