What is a better method of saving?
#7

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
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...
I really dont understand why you would send multiple queries when you only need one.


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*.
Reply


Messages In This Thread
What is a better method of saving? - by Scenario - 10.02.2011, 23:37
Re: What is a better method of saving? - by Antonio [G-RP] - 10.02.2011, 23:57
Re: What is a better method of saving? - by Scenario - 11.02.2011, 00:30
Re: What is a better method of saving? - by Antonio [G-RP] - 11.02.2011, 00:50
Re: What is a better method of saving? - by Krx17 - 11.02.2011, 01:25
Re: What is a better method of saving? - by cessil - 11.02.2011, 01:51
Re: What is a better method of saving? - by Kyosaur - 11.02.2011, 02:07
Re: What is a better method of saving? - by H7_Tr0m - 11.02.2011, 03:31
Re: What is a better method of saving? - by -Rebel Son- - 11.02.2011, 03:35
Re: What is a better method of saving? - by Antonio [G-RP] - 11.02.2011, 04:05

Forum Jump:


Users browsing this thread: 5 Guest(s)