SQL Queries MUCH slower in 2019.1.2, serious performance regression
已回答
Hi,
I just upgraded pycharm from 2018.3.4 to 2019.1.2, I do both python and SQL extensively. Suddenly, "SELECT * FROM ..." queries on a large table take minutes to return the first 500 rows, while on 2018.3.4 it only took a few seconds. This is consistent across several different databases and tables. I'm using both Azure DB and SQL Server.
Doing "SELECT TOP 10 * FROM..." is still fast. But as I increase the 10 to thousands or millions it gets really slow, even though it's only returning the first 500 rows as usual.
Reverting to 2018.3.4 made the queries fast again.
请先登录再写评论。
What is your OS? If you have antivirus/firewall please try with it disabled or make sure that IDE settings directories, IDE installation home, IDE process are excluded from the scan.
Make also sure to check with the same jdbc drivers (see how to change if needed: https://www.jetbrains.com/help/datagrip/connectivity-problems.html#step-3-check-the-driver-version).
If issue remains, please attach IDE log and sql log (Help | Show SQL Log in ... action) directories zipped after reproducing and output from Test Connection button for the Data Source.
Thanks. OS is Windows. I added exclusions for the settings/installation dirs and the process, made no difference. JDBC driver is the same version (7.2.1 - Azure DB) as I'm using on 2018.3.4.
I don't see any way to attach zip file of logs?
Note that the first 500 rows ARE returned pretty fast (just like 2018.3.4), but the query keeps running for minutes after that (unlike 2018.3.4).
For uploading you can use ftp://ftp.intellij.net/.uploads / https://uploads.services.jetbrains.com or any file sharing service.
Ok, uploaded the file:
Looks like fetching the results takes most time:
notice the fetching time: 58 s 164 ms. It also looks like the connection has been disconnected at some point then re-connected. Do you have stable connection? Any VPNs you use?
try also switching PyCharm to use 1.8 java runtime: you can point IDE to the bundled 1.8 runtime in previous PyCharm distribution.
What options do you have under Settings (Preferences on macOS) | Database | 'Data Views'? Could you check that you have the same options in both versions.
Yes, they are the same:
Thank you for details. Filled the https://youtrack.jetbrains.com/issue/DBE-8435. Please follow it for updates.
As a workaround try to execute in sql console session
Thanks, that makes the query faster just like "...TOP 500 *...", but doesn't allow paging through more results. I'll follow the issue.
I have the same issue with PostgreSQL queries executing the same query in console or other tools, 20-30% faster