Fork me on GitHub
#sql
<
2022-02-11
>
pinkfrog13:02:57

How do you profile how much time a query takes ?

pinkfrog13:02:26

I can wrap jdbc/execute with a start and end time, and log it. But is there any battery included support?

plexus15:02:38

You might want to look at what your database offers, eg in postgres you can enable a slow query log

pinkfrog15:02:41

Maybe I shall more focus on the db side.

1
seancorfield17:02:15

@UGC0NEP4Y next.jdbc has builtin support for logging like this.

Ben Sless19:02:17

You can also ask the database to explain it's query plan

pinkfrog04:02:58

Yes,I saw that also after your comment.