Quicker SQL statements ... removed tests for functionality that is
broken and known

Change-Id: Iaf0dd08da2fcad21cbc8956f581ebb695f8f282e