Constraints elimination during runtime

Поиск
Список
Период
Сортировка
От Weck, Luis
Тема Constraints elimination during runtime
Дата
Msg-id IA3PR10MB81133D5DD8051D7018DECD338DBD2@IA3PR10MB8113.namprd10.prod.outlook.com
обсуждение исходный текст
Ответы Re: Constraints elimination during runtime
Список pgsql-performance
I am not sure if this list is the most appropriate, but I figured I’d share it here…

If a column has a check constraint, such as CHECK (length(value) < 10) or even something like a VARCHAR(10) shouldn’t a query like this become a no-op/false instantly?

  create table test_constraint (
     value varchar(10) // could be a CHECK constraint also
  );

insert into test_constraint values (‘small’);

-- shouldn’t this qual always evaluate to false? 
select * from test_constraint where value = ‘way too big to fit anyway’; 

В списке pgsql-performance по дате отправления: