12-11-2016 07:16 PM
Essentially I am having some PC problems and I think PostgreSQL is causing them, but I am not sure why. [For those that don't know what that is, it's a database like SQL](https://en.wikipedia.org/wiki/PostgreSQL)
My laptop is a Lenovo Y-50, it has 16GB of RAM, 1TB of HDD, Intel i7 processor 2.6GHz
My latest project uses PostgreSQL, but ever since I downloaded it, I noticed that I have had problems of my PC slowing down. The only solution [I have found is to completely prohibit PostgreSQL from running inside the System Configuration](http://i.imgur.com/2oftepO.png). If I leave this checked and turn off PostgreSQL/PostgreSQL service, **it still slows it down**. I also noticed nothing odd happening in my task manager. [Here is my task manager before running PostreSQL.](http://i.imgur.com/327kE3N.png) And [after](http://i.imgur.com/0MzTVDU.png) (yes I do have the same apps open, expect this time PostgreSQL is running in the background).
So after an hour of running PostgreSQL everything is fine, I continue to build my project, connecting to PostgreSQL, time passes and I notice that the fan on my PC is getting pretty loud. The Start Menu is very slow, it takes forever to search for something on the start menu, and most noticeably, look at the volume [before running postgreSQL](http://i.imgur.com/PRKNd5u.gif) and [after!](http://i.imgur.com/PFlY5zG.gif). (Note the logger detects I pressed but the volume lags behind enormously). Not only that but Chrome takes forever to open and load. I thought maybe if I stopped PostgreSQL altogether it would stop but no. The problem still persists (even after hours!); the only solution I found is what I mentioned before. I must go to System Configuration and uncheck PostgreSQL services, then do a restart and the PC is working fine. (If I restart the PC and leave the PostgreSQL services checked, the PC will work but then slow down after a couple of hours).
What could be causing this ? Anyway to fix this ? Is it my PC ? Is it the code I am writing ? The solution I found works but I shouldn't have to do this. Maybe it could be Visual Studio Code (the IDE I am using; and I doubt it since I had VSC months ago and no problem like this occured) ? I do not know, I just know that the problem started once I downloaded PostgreSQL. Any help whatsoever will greatly be appreciated. Thank you.
12-12-2016 09:13 AM
I'm not expert on the matter. But did you do autovacuum?
The only thing PostgreSQL can cause any PC to slow down is running queries. Well, that is to expected. You are using it after all. Reading and Writhing DB cause a lot of caching and data writhing. While you may say 'My Old Desktop is faster then this!!' Well? If the cache is too much the data will be read directly from the disk. Also, what speed of your disk again? 5400rpm, isn't it? While Desktop is normally at 7200rpm (about 30% more disk access speed).
Also, if you are search enough (I think you do before make this thread). From this thread http://stackoverflow.com/questions/11932157/postgresql-database-slow-down. I think most of the server using RAID5 to speed up their server and secure data. So, technically the speed increase in accessing the data is 3 times higher compare to normal SATA (if using 3 disks). While writing speed also increase to some extend (ex. 3 disk = 2times higher). So, you cannot compare just any Desktop to Laptop in data accessing speed.
This is just my speculation. Since I also using Apache SQL. I know that even my Y50-70 spac is much higher than desktop. My old desktop still win in speed comparing to each other. Also, when using SQL I notice slowdown in my Y50-70 (I have to wait about 1 hour to resume the work again). But I think noSQL have a little to no impact to Y50-70, or I just did not using enough? IDK. I'm happy working with noSQL than any SQL DB in my Y50-70.
PS. From the link, you may want to try vacuum and see if there are any increase in performance.