1

Does anyone use p6spy log in production environment?

I would like to enable logging all statements for one table and include stacktrace as well. The table I am interested in contains only a couple (usually really only 2) rows which are read and updated every 2-3 seconds. I was afraid that p6spy log could have performance impact on all database related operations.

Initial testing did not show any measurable difference between situation when p6spy log was enabled or disabled. Does anyone have the same experience? Is it generally safe to use p6spy in production?

Environment: java application, hibernate, postgresql

L.R.
  • 977
  • 6
  • 22

2 Answers2

2

I'm using p6spy in production environment (not by choice, it is deeply embedded in some legacy code). Haven't encountered a performance hit due to it yet tho.

fo_x86
  • 2,583
  • 1
  • 30
  • 41
  • Thank you for the answer, but this does not give any comparison. I was looking for some scenario when the same application was used both with and without p6spy. – L.R. Sep 12 '12 at 02:29
1

well, based on what I've played around, p6spy has impact, depending on how much you log. Maybe it was due to fact, that tables tested were more sophisticated. I've seen minimal impact in case of threshold having set in a value, where nothing was logged, however the more statements you log, the higher impact you'd have.

And I would be worried about performance in case of logging stacktraces.

I can't refer to any official data, however in the situation like this the best way is to test your use case.

Peter Butkovic
  • 11,143
  • 10
  • 57
  • 81