| От | Tom Lane |
|---|---|
| Тема | Re: Left joining table to setof function |
| Дата | |
| Msg-id | 3524.1189216750@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Left joining table to setof function (Robert Fitzpatrick <lists@webtent.net>) |
| Список | pgsql-general |
Robert Fitzpatrick <lists@webtent.net> writes:
> trax=# explain analyze select * from client_search_id_func(62) left join tblsearch_selections ON search_id = 62 and
user_id= 'RF' and ((selected_value = clientno and selection_type = 'client') or (selected_value = contactno and
selection_type= 'contact'));
I don't think you're going to get anywhere until you get rid of the
OR-of-ANDs join condition; the OR defeats using any reasonably
intelligent join method such as a merge or hash join. You should
redesign the set-returning function to emit a representation that
matches the table you want to search, or perhaps rethink the table's
representation.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера