Apologies if my wording is not fully correct - I am quite new to all of this.
Goal: I am trying to improve the speed at which I get data from my database
Setup:
I am hosting the DB on server A. The DB is also accessible via a website like www . mydbweb . com (not my actual website ofc). This access on the server side happens via Nginx with routs to something like localhost:1234
.
Question: If I log inside the server and make a request to the DB via the website (i.e. www.mydbweb.com
) the data will be fetched via the network (right?), but if I make a request via localhost:1234
directly, would this mean that no data is passed through the network?
In general, was is a way to skip the data being fetched through the network? I feel that the network does introduce some kind of a latency or bottleneck for large data queries.