Sv: Re: Re: Removing INNER JOINs

From: Andreas Joseph Krogh <andreas(at)visena(dot)com>
To: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Sv: Re: Re: Removing INNER JOINs
Date: 2017-12-01 09:32:09
Message-ID: VisenaEmail.c.f48e036910234fe6.1601168de78@tc7-visena
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

På fredag 01. desember 2017 kl. 03:53:29, skrev David Rowley <
david(dot)rowley(at)2ndquadrant(dot)com <mailto:david(dot)rowley(at)2ndquadrant(dot)com>>:
On 1 December 2017 at 15:34, Andreas Joseph Krogh <andreas(at)visena(dot)com
<mailto:andreas(at)visena(dot)com>> wrote:  Can someone please explain, in
layman-terms, what the problems with FKs are related to JOIN-removal?
 
Pretty much what I just wrote after "Unfortunately not," above, although you
asked a few seconds before I sent.
 
We're able to use UNIQUE INDEXes as proofs to remove LEFT JOINs as (with the
exception of deferred unique indexes) these are updated right away, rather than
deferred until the end of the statement as is the case with NOT DEFERRABLE and
not DEFERRED foreign keys. The fact that the foreign keys do not update the
referenced rows right away means that there is a non-zero window of time that
the constraint is violated, therefore, if a query which is run, or is running
during that time, we could return the incorrect results if we were to remove an
INNER JOIN during the planning of that query.

 
Hm...
The fact that Oracle has solved this makes me think you guys can solve this
too if you put enough brain-power to it:-)
 
-- Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andreas(at)visena(dot)com <mailto:andreas(at)visena(dot)com>
www.visena.com <https://www.visena.com>
<https://www.visena.com>

 

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Steven Lembark 2017-12-01 17:49:42 Re: large numbers of inserts out of memory strategy
Previous Message David Rowley 2017-12-01 02:53:29 Re: Re: Removing INNER JOINs