Not really sure where to ask this question, as it is Database related I will ask it here. We have a database with a table containing around 8Billion records. When we query this database using intellij and the sql-server driver. the response is usually within 10-20 seconds. If we run exactly the same query, with exactly the same sql-driver on the same development machine the query will take around 14 minutes. Is there any way to "capture" what intellij sends / does with this query.