Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any SQL query syntax that returns query execution time and query result at the same time?

share|improve this question

closed as off topic by Derek Downey, Jack Douglas, jcolebrand Aug 3 '11 at 14:21

Questions on Database Administrators Stack Exchange are expected to relate to database administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

From what context? A normal select returns this information: mysql> SELECT 1; +---+ | 1 | +---+ | 1 | +---+ 1 row in set (0.04 sec) – Derek Downey Jul 26 '11 at 15:49
There really isn't a redeeming quality to this question. It's not being updated/followed up on, and it's not well formed. I'm closing (it may be reopened if edited to be of quality. If so, flag and we'll consider it). – jcolebrand Aug 3 '11 at 14:21
up vote 1 down vote accepted

I agree with @DTest, how are your running your query? If you log directly into a MySQL terminal style and hand-run queries, it will give you a time result. Also, if you use Oracles MySQL database tool (I believe it is called "MySQL Workbench"), you can connect to your database server directly and the GUI will also give you time results for the query if you hand-run it.

share|improve this answer
I want to run it through my application and display execution time on application Windows. – RPK Jul 27 '11 at 4:38
@RPK since this is a question on a specific application, or programming language, you might re-ask it on stackoverflow with more details of what language you are using. – Derek Downey Jul 27 '11 at 15:59

Not the answer you're looking for? Browse other questions tagged or ask your own question.