skx has asked for the wisdom of the Perl Monks concerning the following question:
In my CGI::Application I use DBI - connecting to the database as it starts, disconnecting at the end.
During the course of the different run modes a different number of SQL queries are executed.
Is it possible to have a count of the "number of queries" executed in some simple manner?
Right now the only approach seems to be to subclass DBI, and have a counter which is incremented in 'execute' or 'query' methods, is that correct?
(I'm looking to have something which I've seen a lot of PHP applications do; show at the bottom of the page "Generation took xx queries and xx seconds". This will also help me keep track of potential database slowpoints).
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: DBI query count?
by redhotpenguin (Deacon) on May 20, 2005 at 07:39 UTC | |
Re: DBI query count?
by Joost (Canon) on May 20, 2005 at 08:35 UTC | |
Re: DBI query count?
by Tanktalus (Canon) on May 20, 2005 at 14:52 UTC | |
Re: DBI query count?
by thcsoft (Monk) on May 21, 2005 at 01:45 UTC |
Back to
Seekers of Perl Wisdom