It'll generally be slower, due to the additional overhead of calling a php script, which then needs to do the same work as MTA would do using dbQuery. Also allowing the client to save data via a web request is a terrible idea, because you're opening your server to allowing any client to store any information in the database (as I could just go ahead and use my Browser to store data, rather than the MTA client).