While making query in MySQL by shell it shows time spent after result.
mysql> SELECT * FROM `SOME_TABLE`; +----+---------+ | ID | NAME | +----+---------+ | 1 | `JOHN` | +----+---------+ 1 row in set (0.01 sec)
If you see spent time for this query is 0.01 sec. I want to know how to get this spent time by Java code using JDBC.