Re: Function returns error (view)
От | Bart Degryse |
---|---|
Тема | Re: Function returns error (view) |
Дата | |
Msg-id | 47C53892.A3DD.0030.0@indicator.be обсуждение исходный текст |
Ответ на | Re: Function returns error (view) ("Markus Bertheau" <mbertheau.pg@googlemail.com>) |
Ответы |
Re: Function returns error (view)
|
Список | pgsql-sql |
For rather "simple" queries like this one PostgreSQL indeed seems to be quite smart.
I have quite a lot of statements where it does make a difference though (PostgreSQL 8.2.4).
As long as I have one statement where it makes a difference I will use the join
rather than the IN(subselect) just to be sure of optimal performance.
Keeping that in mind I don't see any harm in advising others to do so too.
But you're right in stating that it's not always necessary.
>>> "Markus Bertheau" <mbertheau.pg@googlemail.com> 2008-02-27 10:09 >>>
2008/2/27, Bart Degryse <Bart.Degryse@indicator.be>:
>
> I would also suggest you replace the
> ...t.cod_user IN (subselect)
> by a join construction. I think it's more performant.
In recent versions PostgreSQL is quite smart when planning IN, so that
shouldn't be a concern.
Markus
--
Markus Bertheau
Blog: http://www.bluetwanger.de/blog/
В списке pgsql-sql по дате отправления: