Hi Leonardo,
I think this kind of "profiling"
test won't give you reliable results. If you run this test against a real database backend there will be many caching effects (database, JPA, file system, OS) and something like this which could lead to very varying results from test run to test run and of course database server to database server.
I'm not an expert in performance testing databases but I guess it would be more appropriate to do some kind of stress test or performance tests which runs this test multiple times and maybe concurrently with multiple connections. But then of course this definitely isn't a good unit test anymore.
You should probably move it to a separate test suite for such tests. Unfortunately the absolute estimated time for these queries still depends on the performance of your test client machine and your database server and DBMS but it's still better than running this test only one with your other unit tests.
Perhaps I should mention that you probably shouldn't worry too much about this fine tuning except this part is really a performance bottleneck for your application
Marco