Reputation: 1
Lets say i want to use the RJDBC package to connect with a database on the same machine as where the R script is going to be executed and from where the JDBC connection is going to be established. Is requesting and getting the data from the database faster than if the R script was on another machine than the database?
Since it is reaching the data through the same machine and therefore the same network i would think that it is faster. Can somebody confirm?
Upvotes: 0
Views: 38
Reputation: 48769
In terms of "transfer throught the network" performance, yes. It would be faster.
However, there are multiple factors to consider in the overall performance of a query. If the database is running on a fast machine, then the query may run faster. If the database runs in the same machine than your application, then both may compete for resources (memory, cpu, I/O) and that can negatively impact the query performance.
So, bottom line, is that depends.
Upvotes: 1