Re: Unions and where optimisation
От | Tomasz Myrta |
---|---|
Тема | Re: Unions and where optimisation |
Дата | |
Msg-id | 3E1C366B.5080406@klaster.net обсуждение исходный текст |
Ответ на | Unions and where optimisation (Boris Klug <boris.klug@control.de>) |
Ответы |
Re: Unions and where optimisation
Re: Unions and where optimisation |
Список | pgsql-performance |
Hannu Krosing wrote: > > try making the orderevents view like this: > > create view orderevents as > select rk.aufnr, sub.ts > from rk150 rk, > ( select ts from rk150 where aufnr = rk.aufr > union > select ts from rk151 where aufnr = rk.aufr > union > select ts from rk152 where aufnr = rk.aufr > ) as sub > ; > > this could/should force your desired behavior. > Hannu, does it work? Few months ago I lost some time trying to create this kind of query and I always got error, that subselect doesn't knows anything about upper (outer?) table. In this query you should get error: "relation rk does not exist". What version of postgres do you have? Tomasz Myrta
В списке pgsql-performance по дате отправления: