Many important applications, e.g. planning tasks, demand the flexible and efficient use of personalization and preference handling techniques. Applying preference-based search technology could improve things quite a lot, e.g. using Preference SQL where preferences (i.e. soft constraints) can be combined with hard constraints. However, there are still fundamental efficiency issues that need to be addressed. In this paper we study preference database queries involving hard constraints over the sum of multiple attributes. We develop algebraic optimization techniques to transform a preference query with a sum constraint in order to enable its efficient processing by database engines. For this purpose we present new transformation laws for an efficient solution of this problem.