Re: [GENERAL] Question about antijoin

2016-07-12 Thread dandl
ginal Message- > From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- > ow...@postgresql.org] On Behalf Of Tom Lane > Sent: Wednesday, 13 July 2016 12:13 AM > To: dandl <da...@andl.org> > Cc: pgsql-general@postgresql.org > Subject: Re: [GENERAL] Question about

Re: [GENERAL] Question about antijoin

2016-07-12 Thread Tom Lane
"dandl" writes: > This got my interest! It's of great interest to me to know how and when > Postgres performs an anti-join (this being a significant omission from SQL). > Is this a reliable trigger: (NOT EXISTS )? That's one case; see convert_EXISTS_sublink_to_join() for the

Re: [GENERAL] Question about antijoin

2016-07-12 Thread David Rowley
On 12 July 2016 at 12:41, dandl wrote: >>NOT EXISTS (SELECT NULL FROM dyr_pause_mot WHERE avlsnr = a.avlsnr) >> >> This can be executed as anti-join and is often more efficient. > > This got my interest! It's of great interest to me to know how and when > Postgres performs an

[GENERAL] Question about antijoin

2016-07-12 Thread dandl
>NOT EXISTS (SELECT NULL FROM dyr_pause_mot WHERE avlsnr = a.avlsnr) > > This can be executed as anti-join and is often more efficient. This got my interest! It's of great interest to me to know how and when Postgres performs an anti-join (this being a significant omission from SQL). Is