— Constraints play an important role in the efficient query evaluation in deductive databases. In this paper, constraint-based query evaluation in deductive databases is investigated, with the emphasis on linear recursions with function symbols. Constraints are classified into three classes: (i) rule constraints, (ii) integrity constraints, and (iii) query constraints. Techniques are developed for the maximal use of different kinds of constraints in rule compilation and query evaluation. Our study on the roles of different classes of constraints in set-oriented evaluation of linear recursions shows that (i) rule constraints should be integrated with their corresponding deduction rules in the compilation of recursions; (ii) integrity constraints, including finiteness constraints and monotonicity constraints, should be used in the analysis of finite evaluability and termination for specific queries; and (iii) query constraints, which are often useful in search space reduction and ...