another embedded sql efficiency fix