| От | Thomas G. Lockhart |
|---|---|
| Тема | Re: [HACKERS] Case statement ready? |
| Дата | |
| Msg-id | 3668CC28.30C5349C@alumni.caltech.edu обсуждение исходный текст |
| Ответ на | Re: [HACKERS] Case statement ready? (Bruce Momjian <maillist@candle.pha.pa.us>) |
| Список | pgsql-hackers |
> > For the costing I would assume
> > that the cost should be related to the sum of the costs of the
> > individual clauses within the CASE statement (or maybe half of the
> > sum).
> Isn't only one of the case values going to be used? Wouldn't you want
> the average of the case entry costs?
Hmm. Actually, on average half of the conditional clauses will be
evaluated, and then one of the result clauses will be evaluated. So
perhaps the cost should be:
(0.5*sum(conditional clauses))+avg(result clauses)
Or perhaps we should be pessimistic and leave off the 0.5.
- Tom
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера