It is easy enough to do in either language. What version of SQL are you using?
Here's something from an earlier StackOverflow post:
http://sqlserver2000.databases.aspfaq.com/how-do-i-time-my-t-sql-code.html
DECLARE @a DATETIME, @b DATETIME
SET @a = CURRENT_TIMESTAMP
DECLARE @i INT
SET @i = 0
WHILE @i < 10000
BEGIN
SET @i = @i + 1
END
SET @b = CURRENT_TIMESTAMP
SELECT DATEDIFF(MS, @a, @b)
The key thing when timing queries is that there are many things that have to be considered in light of effects such as caching etc. that may throw off your computation.
Are the queries that you are timing eventually going to be called from Java code? Then it would make sense to time in Java, to take that overhead into account and any interactions.
If not, it would make sense to do it in SQL, to avoid any of those interactions.
In this situation, you are trying to measure performance -- and design is not language-specific - you can design this well in SQL or in Java. The key thing is what are you trying to measure? What is the most accurate way to measure it?
You might want to time a large number of queries as the time for any single transaction could be insignificant because of the magnitude of the operation. But if you do this, you have to be careful to avoid caching effects where the results are skewed by the data being in memory instead of being fetched from disk ... unless this is what is likely to happen in a real-world scenario.