tags:

views:

269

answers:

1

I have a rather complicated trigger and I'm afraid it's execution time is too long. How can I measure it?

+1  A: 

A trigger is like every other sql query, with the difference that it can not be called explicitly. About measuring performance of sql query it really depends on your implementation, so a little more information will be useful.

With php, with some tool... how?

The simplest way(in the db) is to INSERT NOW in the beginning of the trigger and INSERT NOW at the end.

But time measurement(if this is what you asked) is not always the best choice to measure performance.

This is a good way to start - Using the New MySQL Query Profiler

Svetlozar Angelov