I have a PostgreSQL setup for VPS that I own - the software that accesses the database is a program called PokerTracker.
PokerTracker records all your hands and statistics during online poker.
I wanted it to be accessible from several different computers, so I decided to install it on my VPS, and after several hiccups I managed to connect it without errors.
However, performance is terrible. I have done a lot of research on "remote post-congress", etc., and I have not found an answer yet, so I hope someone can help.
Notes:
The queries I'm trying to fulfill are very small. When connected locally to the VPS, the request is executed instantly.
When you run it remotely, it takes about 1 minute 30 seconds to complete the request.
VPS runs on 100MBPS, and then the computer I'm connecting to is on the 8MB line.
The network connection between them is almost instantaneous, I can connect remotely normally, without any restrictions, and I host several websites that run MSSQL, and all queries are launched instantly, regardless of whether they are connected remotely or locally, so they seem specific to PostgreSQL.
I use my latest software version and the latest compatible version of PostgreSQL with their software.
The database is a new database containing hardly any data, and I ran a vacuum / analysis, etc. all to no avail, I see no improvement.
I donβt understand how MSSQL can query almost instantly, but PostgreSQL is fighting so hard.
I can use telnet to connect to port 5432 on the VPS IP without problems, and, as I said, the request is completed, it takes a very long time.
What I notice is on the router at the start of the request, that hardly any bandwidth is used - but then I would not expect this to be a simple request, but I'm not sure if this is a problem. I tried to connect remotely on 3 different networks (including different routers), but the problem remains.
Connecting remotely through another machine via LAN is instantaneous.
I also edited the postgre conf file to allow for more memory / buffers, etc., but I don't think this is a problem. I ask him to do it very simply - it should not be intense at all.
Thanks Ricky
Edit: note that the client and server are running Windows.
Here is the information from the configuration files.
pg_hba - currently allowing all traffic:
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# IPv4 local connections:
host all all 0.0.0.0/0 md5
# IPv6 local connections:
# host all all :: 1/128 md5
And postgresqlconf - I know that I gave some buffers / memory for this configuration, just to check if this problem was - show only without commenting:
listen_addresses = '*'
port = 5432
max_connections = 100
shared_buffers = 512MB
work_mem = 64MB
max_fsm_pages = 204800
shared_preload_libraries = '$ libdir / plugins / plugin_debugger.dll'
log_destination = 'stderr'
logging_collector = on
log_line_prefix = '% t'
datestyle = 'iso, mdy'
lc_messages = 'English_United States.1252'
lc_monetary = 'English_United States.1252'
lc_numeric = 'English_United States.1252'
lc_time = 'English_United States.1252'
default_text_search_config = 'pg_catalog.english'
Any other information is required, please let me know. Thank you for your help.