Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seems like SQL Tabs may be causing performance issue in Database (RDS/postgres) #128

Open
NachiMK opened this issue Apr 9, 2019 · 1 comment

Comments

@NachiMK
Copy link

NachiMK commented Apr 9, 2019

Hi,

Been recently in fond of using SQL Tabs. I use it to connect to RDS database on AWS. I connect to postgres flavor of the database. My database is behind a VPN and I am on same VPN and I connect from same region as my instance is at.

I noticed that SQL Tabs runs the below query:

/*sqltabs*/ 
SELECT hashtext(string_agg(word, '')) 
FROM (     
        SELECT DISTINCT word 
        FROM 
            (
                    SELECT nspname AS word FROM pg_namespace
            UNION   SELECT relname FROM pg_class
            UNION   SELECT proname FROM pg_proc
            UNION   SELECT attname FROM pg_attribute
            UNION   SELECT name FROM pg_settings
            ) v 
        ORDER BY 1 
    ) w 
ORDER BY 1

It runs it repeatedly and also seems to leave the sessions active (meaning nothing is closed). So my CPU usage went high and number of active sessions hit 400+ within 8 hours.

I do have 6 databases and some databases are reporting database with data from multiple sources so I have close to 1000+ tables. But, none of the databases are yet used by end users because it is still in testing and with me there is only one other person works on it. The database is loaded with data every half hour so my process is not the one causing issues.

Is there any where I can disable inteli-sense completely and try this out? I am planning to test my theory one more time and If I find anything I will let you know.

Thanks,
Nachi MK

@sasha-alias
Copy link
Owner

hi, you can try to comment out these 2 lines https://github.com/sasha-alias/sqltabs/blob/master/src/Dispatcher.js#L390-L391
and make an own build to see if it helps.

For the future we probably have to disable getting keywords from DB in case autocompletion is off.
Other ideas are also appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants