Temporary or constant MySQL connection?
#1

In which cases temporary or constant MySQL connection is better? What do you preffer?
Reply
#2

It depends what you're doing. In my opinion, I think a constant MySQL connnection is better, because it's less work to keep closing the connection in re-connecting. To be honest, I don't know what you mean by temporary? Do you mean in a case where you load data from a db and close the connection?
Reply
#3

Quote:
Originally Posted by Carlton
I don't know what you mean by temporary? Do you mean in a case where you load data from a db and close the connection?
Yes.

Waiting for more opinions.
Reply
#4

Quote:
Originally Posted by Ellis
Quote:
Originally Posted by Carlton
I don't know what you mean by temporary? Do you mean in a case where you load data from a db and close the connection?
Yes.

Waiting for more opinions.
You can do that not a big problem, I just use constant for loading data, and saving it at the end when a player disconnects. So say like, you're using a temporary connection ok, and you wan't save data when a player leaves or something, the DB will keep connection and re-connecting over and over again, it's better to just leave it connected until you exit the GM or the Filterscript.
Reply
#5

Sure, i do understand that keeping MySQL connection constatly speeds things up because connecting takes a little time (not sure how much). But what about memory? Still looking forward to other's opinion.
Reply
#6

Quote:
Originally Posted by Ellis
Sure, i do understand that keeping MySQL connection constatly speeds things up because connecting takes a little time (not sure how much). But what about memory? Still looking forward to other's opinion.
No it doesn't, well, depends what plugin you're using, [RAZ]ADreNaLiNe-DJ's mysql plugin is a bit slow connecting, the others work fine. I don't know about memory though, all I know is it's not much.
Reply
#7

Does everyone think the same?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)