New answers tagged unique-constraint
0
votes
Is a Composite UNIQUE Constraint On an Already UNIQUE Column Redundant?
Are you asking about satisfying a query like this?
select col1, col2, col3 from person where customer_id = 785
If customer_id is the leading component in two indexes, the query optimizer will have a ...
0
votes
Is a Composite UNIQUE Constraint On an Already UNIQUE Column Redundant?
Assuming your example is valid,above constraint is not redundant.
customer_id is unique on its own way.
But as per business requirement customerid+name should also be unique.
Say as per biz req. ...
Top 50 recent answers are included
Related Tags
unique-constraint × 310postgresql × 95
mysql × 83
index × 61
sql-server × 58
database-design × 56
primary-key × 36
constraint × 30
foreign-key × 22
oracle × 14
null × 12
index-tuning × 11
innodb × 10
update × 10
insert × 10
duplication × 9
trigger × 8
upsert × 8
sql-server-2008-r2 × 7
mariadb × 7
performance × 6
sql-server-2008 × 6
t-sql × 6
sql-server-2014 × 6
sqlite × 6