Improve SQL setup