So I am new to Rails, so pardon the basic question.
I see rails spits this out (in the console) for every request I make to my controller. Why? I'm not even doing any DB operation, I just started writing a HelloWorld rails app. I did pick mysql as the db when creating this rails project (rails -d mysql helloworld)
SQL (0.1ms) SET NAMES 'utf8'
SQL (0.1ms) SET SQL_AUTO_IS_NULL=0
So I noticed, that rails attempts to establish a DB connection for every request, irrespective whether you do a DB/ActiveRecord operation. It does this right after it does action_controller/dispatch. This seems like a waste of DB resource to me, why establish a connection to DB when I may not even do a ActiveRecord operation??