| От | Tom Lane |
|---|---|
| Тема | Re: subselect instead of a view... |
| Дата | |
| Msg-id | 6003.1038288569@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: subselect instead of a view... ("Dan Langille" <dan@langille.org>) |
| Ответы |
Re: subselect instead of a view...
|
| Список | pgsql-sql |
"Dan Langille" <dan@langille.org> writes:
> SELECT E.name, EP.pathname, E.id, EP2.pathname, CL.id
> ...
> and EP2.pathname like EP.pathname || '/%'
> I am still suspicous of that like. It seems to be the performance
> killer here. There is an index which can be used:
It won't be, though. The LIKE-to-indexscan transformation happens at
plan time, and that means it can only happen if the pattern is a
constant. Which it surely will not be in your example.
regards, tom lane
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера