View selection is important in many data-intensive systems e.g., commercial database and data warehousing systems to improve query performance. The view selection problem is one of the most complex problem solving: a NP-hard problem. In a distributed environment, the problem becomes more challenging. Indeed, it includes another issue which is to decide on which computer nodes the selected views should be materialized. The principal objective of this manuscript is to provide a novel and efficient approach to address the view selection problem. For this purpose, we designed a solution using constraint programming which is known to be efficient for the resolution of NP-hard problems and a powerful method for modeling and solving combinatorial optimization problems. Constraint programming is a general framework which relies on a combination of techniques that deal with reasoning. To solve a given problem by means of constraint programming, the problem must be represented as a constraint satisfaction problem. This part of the problem solving is called modeling. Then, the resolution of the modeled problem is performed automatically by the constraint solver in the solving stage.