[Making Logs]MySQL vs Text Files for Performance
#1

At the very outset, I would like to say that I am solely worried about performance and not about the productivity or applications of using either of the systems.

Concerns while using text files:
  • Most logging systems requires us to save time and date which means heavy utilization of PAWN code (which of course is WAY WAY WAY slower than plugins/other programs running on the system)
  • SAMP is single threaded, we have to wait for fwrite to complete before we can move on. (Maybe fwrite adds it to the queue?)
  • fwrite needs to convert PAWN String to C-String?
Advantages of using text files:
  • To be added
Concerns while using MySQL:
  • Internal Overhead of using SQL
Advantage of using MySQL:
  • Executed in a different thread
  • SQL Server has the ability to add CURRENT_TIMESTAMP by default for the INSERT queries.
  • Doesn't require lot of slow PAWN code
Maybe the topic is too general? Should I have two types of logs? A log where insertion is done almost every second and a log where insertion is done once every minute?

What if you wanted to log commands used by players?
What if you wanted to log punishments (warn, kick, ban)?


Give your opinions and I shall keep adding every new advantage & disadvantage suggested to my list.
Reply


Messages In This Thread
[Making Logs]MySQL vs Text Files for Performance - by Yashas - 14.02.2016, 08:04
Re: [Making Logs]MySQL vs Text Files for Performance - by ]Rafaellos[ - 14.02.2016, 08:12
Re: [Making Logs]MySQL vs Text Files for Performance - by maddinat0r - 14.02.2016, 08:56
Re: [Making Logs]MySQL vs Text Files for Performance - by AmigaBlizzard - 14.02.2016, 10:28
Re: [Making Logs]MySQL vs Text Files for Performance - by Slice - 14.02.2016, 13:10

Forum Jump:


Users browsing this thread: 2 Guest(s)