Jira issue originally created by user bjori:
The ORM has a neat collection of Events, but the DBAL doesn't have any.
There is an DBAL/Events.php class which has defined constants for preExec, postExec, preExecute and postExecute (similar to ORM/Events.php), but these seem to be completely unused.
The only event/loging seems to be the ->logSql() event.
A preExecute & postExecute events would be great for timing/profiling queries.
Comment created by @jwage:
Roman, do we want to implement these? If so I can produce a patch.
Comment created by romanb:
I'm not sure of their usefulness. Hannes mentions timing queries but this is not really possible since many queries are not executed through execute()/executeUpdate() but rather through prepare() and then execute() on the Statement.
Are there any other good use-cases?
Comment created by @beberlei:
Hm timing and profiling could either be done with vendor-tools or we extend the SqlLogger interface a bit like i proposed in a previous issue. I dont see any other use-cases.
Personally I find timing queries in php code not very useful since its very inaccurate and you dont get any further information.
Comment created by shurakai:
If there are no other use cases, +1 for removal.
Has any decision been made on whether to remove or not?
I think they can be removed as the DBAL SQLLogger now also records the execution time.
Issue was closed with resolution "Fixed"