Re: query slow problem
От | Stephan Szabo |
---|---|
Тема | Re: query slow problem |
Дата | |
Msg-id | 20020729092232.M93417-100000@megazone23.bigpanda.com обсуждение исходный текст |
Ответ на | Re: query slow problem ("frank_lupo" <frank_lupo@email.it>) |
Список | pgsql-general |
On Mon, 29 Jul 2002, frank_lupo wrote: > > > > On Mon, 29 Jul 2002, frank_lupo wrote: > > > > > select id,de2 from irtab where id in (select distinct(ruolofunz) > from > > > irelbtes_1 where entpian=118331)\g > > > > In optimizes poorly currently in postgres, so you're generally better > > off converting to EXISTS or subselect in FROM. Something like > > (untested): > > > > select id, de2 from irtabl where exists (select 1 from > > irelbtes_1 where entpian=118331 and irtabl.id=ruolofunz) > > > > or > > > > select id, de2 from irtabl, (select distinct(ruolofunz) as r from > > irelbtes_1 where entpian=118331) as i > > where i.r=irtabl.id; > My problem is not resolved. What do those give you as explain analyze results? (And the distinct on varient that someone else sent - forgot about that posibility)
В списке pgsql-general по дате отправления: