The overhead of an SQL query has nothing to do with the language you're using.
Re:My first DDoS attack for a $200 ransom
by cpncrunch on Thursday May 05, 2016 @04:20PM
(#11639372)
Of course I'm aware of that. I was just giving an example of a specific case I came across. The point I was making is that there is a lot of inefficient php code out there.
Re:My first DDoS attack for a $200 ransom
by 27182818284 on Thursday May 05, 2016 @05:20PM
(#11639744)
Recently a colleague and I took a PHP+MySQL page that was taking 1-2 minutes to load and were able to drop it down to 30 seconds after our first round of revisions. After a second round of revisions, we got it under 15 seconds, then after another round we got it to the 1-5 second range. Most of the optimizations were in the PHP not in the SQL.
I came to make the same point - but PHP itself is not directly the problem.
There are many, very popular Wordpress plugins that take hundreds of SQL queries just to render a landing page. 10 hits/sec legitimately is "DDoS" territory for many businesses running such things.
For my own sites, I mostly use static html or server-parsed html.