| От | Tom Lane |
|---|---|
| Тема | Re: Optimizer problem in 8.1.6 |
| Дата | |
| Msg-id | 24598.1182534896@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Optimizer problem in 8.1.6 (Fernando Schapachnik <fernando@mecon.gov.ar>) |
| Список | pgsql-general |
Fernando Schapachnik <fernando@mecon.gov.ar> writes:
> En un mensaje anterior, Tom Lane escribi�:
>> Is this query really what you want to do? Because the OR overrides all
>> the join conditions, meaning that rows having p.id_cola_por_ambito=1
>> AND p.id_situacion!=6 must produce Cartesian products against every
>> row in each of the other tables.
> Yes, yes, we found this while working on improving the query. I just
> wanted to point out that the optimizer was doing a sequential scan
> in a situation it could unfould de active_users definition, add the
> login='xxx' clause, and use the index on the users table.
What for, when the query requires fetching the entire table anyway?
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера