Best way would be to do something along these lines of steps..
a) assign a variable the current time along with miliseconds.
b) issue the query
c) assign a second variable with the new time after the query is finished.
d) subtract a from c and print out total seconds.
I can write it for you, but you aren't learning that way Just play around with the time function and see what you can do. If you need help with the code, post what you got and we can help you from there.
i wouldn't want to use you to write it for me ... am just not sure how to get the time the query is being initiated and then retrieve it and do necesary math to calculate time difference.