• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Plugin] Best Practices for MySQL Native Functions?
I'm using BlueG's MySQL plugin version R41-4 and MySQL 8.0.35 on my Ubuntu 22.04.
Every hour, the RAM usage of my mysqld process slowly increases. I have running queries every minute to update business earnings, and at this point, I assume that the problem is due to these minute-by-minute updates.

So, my question is, what is the best MySQL native function for this case? Currently, I'm using mysql_query to update every minute.
Honestly, I also use mysql_query for all queries in my script, and I'm unsure when to use mysql_tquery or mysql_pquery.

I'm also curious about why the RAM usage of my mysqld process always increases?
Finally, after some research I found some answers:
  1. What will I get? or faster ? · Issue #83 · pBlueG/SA-MP-MySQL (github.com)
  2. mysql_pquery vs mysql_tquery (blast.hk)

Conclusion from references:
  • Use mysql_pquery to load a lot of data concurrently, mysql_tquery for everything else.

I think I'll change all of my mysql_query code to mysql_tquery or mysql_pquery depending on the needs, if I don't need the result ASAP better use mysql_tquery, and let it enter the queue. Otherwise, I'll use mysql_pquery to force it into the queue and get the result faster.

Its possible my mysqld is consuming more RAM because I forgot to clear some cache, but I'm pretty sure I already cleaedr the cache after running mysql_query.
I'll test it and update this thread later.

Let me know if you have other options or feedback for me!

Forum Jump: