Re: Poor plan when using EXISTS in the expression list
| От | Pierre Ducroquet | 
|---|---|
| Тема | Re: Poor plan when using EXISTS in the expression list | 
| Дата | |
| Msg-id | 9121794.OZ4C6MeCCK@peanuts2 обсуждение исходный текст | 
| Ответ на | Re: Poor plan when using EXISTS in the expression list (Geoff Winkless <pgsqladmin@geoff.dj>) | 
| Список | pgsql-hackers | 
On Thursday, October 4, 2018 4:46:26 PM CEST Geoff Winkless wrote: > On Thu, 4 Oct 2018 at 13:11, Pierre Ducroquet <p.psql@pinaraf.info> wrote: > > Our developpers ORM (Django's) sadly can not use EXISTS in the where > > clauses > > without having it in the expression part of the SELECT statement. > > I don't know if this will be helpful to you (and I appreciate there's still > the underlying PG issue), but there's a suggestion here that you can work > around this using .extra() > > https://stackoverflow.com/a/38880144/321161 Sure this helps when you know the trap and don't use the Exist support in Django, but this still mean any developer with Django may create a query that, on small volumes, will be a bit slow, and will blow up on big volumes. We sadly can not monitor every piece of code written by developers or imported in the dependencies.
В списке pgsql-hackers по дате отправления: