it is different, because if you have 100 processes all talking to the database, they can safely all have an application-local connection pool holding onto a dozen connections in a pool that are probably largely idle, but are ready in a flash. context switches aren't necessarily a problem because the database probably sees 5-10% of these connection receiving queries at a given moment. Also, mariadb has a thread-pool feature (https://mariadb.com/kb/en/library/thread-pool-in-mariadb/) that allows a significant reduction in threads for a given number of connections.
Contrast to Postgresql, where none of the above is an option, every connection is a process and you don't want thousands of those piled up.
Contrast to Postgresql, where none of the above is an option, every connection is a process and you don't want thousands of those piled up.