Improve SQL limits auto-configuration.