Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^4: Can DBI modify queries on the fly?

by kyle (Abbot)
on Feb 18, 2009 at 03:08 UTC ( #744628=note: print w/replies, xml ) Need Help??


in reply to Re^3: Can DBI modify queries on the fly?
in thread Can DBI modify queries on the fly?

We're not planning to write everything to a log, but there's a "slow queries" log for when something takes too long, and I'd like those entries to have a little more information in them. Unfortunately, I can't always tell ahead of time which queries those will be, so I need to add my special bonus info to everything.

  • Comment on Re^4: Can DBI modify queries on the fly?

Replies are listed 'Best First'.
Re^5: Can DBI modify queries on the fly?
by jfroebe (Parson) on Feb 18, 2009 at 03:52 UTC

    Instead of writing to the DBMS errorlog, how about writing to a table? It would probably have a smaller performance impact. It would also allow you to determine which queries are most often used.. allowing you to focus your energy on the worst.

    Which DBMS are you using? There might be tools that would identify the slow queries that you could use in conjunction with your code line => query.

    Jason L. Froebe

    Blog, Tech Blog

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://744628]
help
Chatterbox?
usemodperl remembers the hilarious merlyn bot
[usemodperl]: perl is not broken, perl is being broken by the web being broken by https, for the love of banking apps on free wifi at coffee shops or something...
[Veltro]: Wondering, would it be so hard to write a small application that you can access using http which forwards the request over web ussing ssl?
[Veltro]: are there not even tools for that?
[usemodperl]: the breakage is so fresh i guess not, so it's up to us! :-)
[usemodperl]: someone has yet to make that future famous free http to https proxy written in perl and supported by ads, paypal, patreon, etc to make millions of dollars a minute!
[Veltro]: Why would this be fresh, I recon this is stuff that happens all the time (not Perl per se)

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2018-06-24 16:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (126 votes). Check out past polls.

    Notices?