I'm having some trouble with a script taking too long while using curl, want to know if it would be more efficient to use sql insert instead. Here is a breakdown of what the script does.
Queries SQL for computer ID's and puts them into an array. Then for each id it will do another sql query for the user of that computer. Then it checks it against ad for group membership. Once this is done, it will curl an extension attribute depending on the output of the dscl.
Now I've been looking into trying to convert my curl to an sql insert statement, but first I want to know if I should even be doing so. Since messing with the database directly can be dangerous. But my thought is, that when I do a curl, it's just sending the info to the front end of the database which is the web server, then it's being put into the database. So can't I just take out the middle man and use an Insert statement?
Any opinions on doing this would help. Just want to see if anyone else has done this.
