Print connection string before initializing the database
Adapt group by to eager loading

see: http://thread.gmane.org/gmane.comp.python.sqlalchemy.user/36757

Without this fix, some not-conforming databases, such as sqlite, may
still do The Right Thing (tm). But this fix is certainly needed for
postgres, which we run in production.