Java or MySQL

Status
Not open for further replies.
Purely dependent on what program you are running in JVM or the size of your database, as well as how MySQL is configured. Why would you even compare the two? They're completely different things (RDBMS vs VM)
 
Upvote 0
If you're running both (Java+MySQL server), MySQL would consume it faster, but you have greater control over it's garbage collection (query cache, tables in memory, etc), whereas JVM would develop memory leaks and eventually over take MySQL and likely never go back down until you restarted the server.
 
Upvote 0
If you're running both (Java+MySQL server), MySQL would consume it faster, but you have greater control over it's garbage collection (query cache, tables in memory, etc), whereas JVM would develop memory leaks and eventually over take MySQL and likely never go back down until you restarted the server.

you release the resources after you close the PreparedStatement.

edit: nvm don't even understand the question unless he means mcdb/xml
 
Last edited:
Upvote 0
If you're running both (Java+MySQL server), MySQL would consume it faster, but you have greater control over it's garbage collection (query cache, tables in memory, etc), whereas JVM would develop memory leaks and eventually over take MySQL and likely never go back down until you restarted the server.
Sounds right to me. :)
 
Upvote 0
Sounds right to me. :)

That's only because you don't know what you're talking about.

The way he is explaining it is directly running a query, or doing PreparedStatement ps = con.prepareStatement("****");
if you do it from java after you close it the resources are released anyways, but if you do it straight from MySQL it won't affect Java at all.
 
Upvote 0
That's only because you don't know what you're talking about.

The way he is explaining it is directly running a query, or doing PreparedStatement ps = con.prepareStatement("****");
if you do it from java after you close it the resources are released anyways, but if you do it straight from MySQL it won't affect Java at all.
I'm talking about general use not Maple private servers.
In general Java does have the obvious garbage collector, but the amount of queries that run on most sql servers aren't a match to the Java process.
 
Upvote 0
I'm talking about general use not Maple private servers.
In general Java does have the obvious garbage collector, but the amount of queries that run on most sql servers aren't a match to the Java process.

Java is basically telling MySQL to do things, there is barely any difference between using them, MySQL is still taking the load.
 
Upvote 0
Status
Not open for further replies.
Back