Improve SQL limits auto-configuration.
Improve SQL limits auto-configuration (2)
Merge branch 'master' into dev