A practical way to improve database query efficiency