I got bored and did a quick experiment. Nothing fancy, just a simple Nodejs API that stores your name and age into MySQL database.
The script is shown below. Notice that there's a console.log that prints the SQL statement before the query.
Using a simple bash command to loop, query the API and take the time elapsed; there's a 1-second difference between code with and without console.log.
console.log is useful for debugging, but make sure you remove them in production :)
Top comments (0)