logoalt Hacker News

watermelon0yesterday at 6:05 AM1 replyview on HN

If 95% of what app does is calling a DB, then the bottleneck is in the DB, not with the PHP.

You can use persistent DB connections, and app server such as FrankenPHP to persist state between requests, but that still wouldn't help if DB is the bottleneck.


Replies

imronyesterday at 6:43 AM

Sometimes it’s still the app:

   rows = select all accounts
   for each row in rows:
       update row
But that’s not necessarily a PHP problem. N+1 queries are everywhere.
show 1 reply