| От | Heikki Linnakangas |
|---|---|
| Тема | Re: Index use difference betweer LIKE, LIKE ANY? |
| Дата | |
| Msg-id | 4DECA21E.2090307@enterprisedb.com обсуждение исходный текст |
| Ответ на | Re: Index use difference betweer LIKE, LIKE ANY? (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>) |
| Список | pgsql-performance |
On 06.06.2011 12:43, Heikki Linnakangas wrote: > Also, even when safe, it's not clear that the transformation is always a > win. The left-hand expression could be expensive, in which case having > to evaluate it multiple times could hurt performance. Maybe yo Sorry, hit "send" too early. Maybe you could put in some heuristic to only do the transformation when the left-hand expression is cheap, or maybe use something like the CaseTestExpr to avoid multiple evaluation and still use the OR form. Also, if the array is very large, opening it into the OR form could increase plan time substantially, so we'd probably only want to do it if there's any Vars involved, and thus any chance of matching an index. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера