Jump to content

SQL or HTTP


Spajk

Recommended Posts

Well, I have put a weird title, but I couldnt think of anything else.

The question I have is simple.

I have some variable whose value I want to sync with a database.

So, on every change I need to update the db.

So, would it be better if I directly update it using MTA's db functions or to send a request to a local http server via call remote and let it handle the rest of updating.

My goal is to lower the usage of MTA server, so what would be better? (HTTP, MySQL and MTA servers are running on the same machine.)

Link to comment

It still spends the same amount of query power to handle it via a web server, if not more (more likely to spend more, because you're sending it from MTA to HTTP to MySQL, while it could just be MTA to MySQL).

I suggest doing it on the server. Everything becomes way easier and handy, instead of having to update your web server whenever updating a query.

Link to comment

It's going to use the same amount of power everywhere, so if they're all located on your dedicated server, then it wouldn't matter where you do it. MTA is already so lightweight that I suggest doing it on MTA. I don't understand why would you want it to spend less power, because queries don't spend that much power at all.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...