| От | Tom Lane |
|---|---|
| Тема | Re: BUG #1252: Optimization of SELECT for NOT NULL case |
| Дата | |
| Msg-id | 5946.1095271630@sss.pgh.pa.us обсуждение |
| Ответ на | Re: BUG #1252: Optimization of SELECT for NOT NULL case (Bruno Wolff III <bruno@wolff.to>) |
| Список | pgsql-bugs |
Bruno Wolff III <bruno@wolff.to> writes:
> On Tue, Sep 14, 2004 at 00:57:07 +0100,
>> CREATE TABLE x (id int4 NOT NULL);
>> SELECT count(*) from x WHERE x IS NULL;
>> Optimizator should rewrite "x IS NULL" to simple "false"
> Based on responses to other optimization requests I have seen, I think the
> answer to this one is going to be that it isn't worth paying the cost
> for every query to check for this case, since no one is going to write
> a query like this except by mistake.
There's been some speculation about making the optimizer aware of table
constraints in general (eg, CHECK constraints) but I tend to agree that
doing this only for NOT NULL isn't very exciting.
regards, tom lane
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера