11.02.2011, 02:07
Quote:
I was working on another accounting system with MySQL when I thought to myself; "What is a better method of saving this?". I am thinking of two different ways...
One: You perform multiple queries, using "UPDATE `accounts` SET ..." as the beginning of each query and send them to the SQL server. Two: You format multiple strings and send all of the data via one query. I do not have examples to show right now, but I will provide some if necessary... |
The best method is using threaded queries, and only saving/updating what you need to be saving/updating, all on-the-fly. I see tons of RP servers updating an entire table when only 2 things have changed, i never understood why they would do this. To top it off, most of the people doing this dont even bother threading their queries *sigh*.