# Placement Policy Constraints

+ In addition to region label, placement policy can be used to set constraints on where data can be stored using other labels
+ Data compliance, hot and cold isolation are typical scenarios
+ For example:
```
CREATE PLACEMENT POLICY ssd 
  CONSTRAINTS="[+disk=ssd]";

CREATE PLACEMENT POLICY hdd 
  CONSTRAINTS="[+disk=hdd]";

CREATE TABLE test.rpt1 (name int) PARTITION BY RANGE (name) (
    PARTITION p0 VALUES LESS THAN (5) PLACEMENT POLICY = ssd,
    PARTITION p1 VALUES LESS THAN (10) PLACEMENT POLICY = hdd);
```
------------------------------------------------------------
Class demo scripts:

https://github.com/pingcap/tidb-course-201-lab/blob/master/scripts/07-demo-placement-policy-01-show.sql

If there are conflicts, the priority of Constraints is greater than the number of replica setting.
