fix sql statement for performance
Merge pull request #1604 from marcel-blonk/release-67

fix sql statement for performance
take out foreign key that causes undue locking of user table
Merge pull request #1608 from marcel-blonk/release-67

take out foreign key that causes undue locking of user table
Merge branch 'release-67' into develop