Skip to content

Conversation

@compwright
Copy link

@compwright compwright commented Nov 12, 2025

This fixes two issues:

  1. Duration values stack with each subsequent query, rendering using the logging feature for benchmarking queries useless.
  2. Fix query logging even in the event of an error, which doesn't currently happen

Jonathon Hill added 2 commits November 12, 2025 15:24
Since LoggedStatement is created by PDO, the passed $logEntry['start'] value is the timestamp that Connection::logQueries(true) was called, not the timestamp that the statement was created. This causes each query’s `duration` value to include the time of all previous queries.
@compwright compwright changed the title Fix start timestamp in LoggedStatement Fix broken query logging Dec 3, 2025
@compwright
Copy link
Author

@pmjones would appreciate it if someone could put eyes on this 🧐

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant