Re: [firebird-support] VIEW optimization

2016-04-08 Thread Gabor Boros gaborbo...@yahoo.com [firebird-support]
2016. 04. 07. 21:41 keltezéssel, Ann Harrison aharri...@ibphoenix.com [firebird-support] írta: > You're thinking of a case where there is a (possibly unstated) referential > relationship between the table that you're getting fields from and the other > table in the view. The table you're getting

Re: [firebird-support] VIEW optimization

2016-04-07 Thread Ann Harrison aharri...@ibphoenix.com [firebird-support]
On Thu, Apr 7, 2016 at 3:41 PM, Ann Harrison wrote: > On Thu, Apr 7, 2016 at 2:27 PM, Gabor Boros gaborbo...@yahoo.com > [firebird-support] wrote: > >> 2016. 04. 07. 19:31 keltezéssel, 'Mark Rotteveel' m...@lawinegevaar.nl >>

Re: [firebird-support] VIEW optimization

2016-04-07 Thread Ann Harrison aharri...@ibphoenix.com [firebird-support]
On Thu, Apr 7, 2016 at 2:27 PM, Gabor Boros gaborbo...@yahoo.com [firebird-support] wrote: > 2016. 04. 07. 19:31 keltezéssel, 'Mark Rotteveel' m...@lawinegevaar.nl > [firebird-support] írta: > > > > > > For a join (inner join), the rows must exist in both

Re: [firebird-support] VIEW optimization

2016-04-07 Thread Gabor Boros gaborbo...@yahoo.com [firebird-support]
2016. 04. 07. 19:31 keltezéssel, 'Mark Rotteveel' m...@lawinegevaar.nl [firebird-support] írta: > > > For a join (inner join), the rows must exist in both tables, so both > tables need to be evaluated. > > Mark I understand this. Try describe my problem with other words. Is the VIEW an atomic

Re: [firebird-support] VIEW optimization

2016-04-07 Thread 'Mark Rotteveel' m...@lawinegevaar.nl [firebird-support]
; Aan: <firebird-support@yahoogroups.com> Onderwerp: [firebird-support] VIEW optimization Datum: do, apr. 7, 2016 19:31 For a join (inner join), the rows must exist in both tables, so both tables need to be evaluated. Mark - Bericht beantwoorden - Van: "Gabor Boros gaborbo...@

Re: [firebird-support] VIEW optimization

2016-04-07 Thread 'Mark Rotteveel' m...@lawinegevaar.nl [firebird-support]
; Onderwerp: [firebird-support] VIEW optimization Datum: do, apr. 7, 2016 19:06 2016. 04. 07. 18:48 keltezéssel, 'Mark Rotteveel' m...@lawinegevaar.nl [firebird-support] írta: > Why wouldn't it be necessary, this is an inner join, so the joined table > needs to be evaluated if the matches row

Re: [firebird-support] VIEW optimization

2016-04-07 Thread Gabor Boros gaborbo...@yahoo.com [firebird-support]
2016. 04. 07. 18:48 keltezéssel, 'Mark Rotteveel' m...@lawinegevaar.nl [firebird-support] írta: > Why wouldn't it be necessary, this is an inner join, so the joined table > needs to be evaluated if the matches row is present. > > SELECT RDB$FIELD_NAME FROM VIEW1 SELECT RDB$FIELD_NAME FROM

Re: [firebird-support] VIEW optimization

2016-04-07 Thread 'Mark Rotteveel' m...@lawinegevaar.nl [firebird-support]
lt;firebird-support@yahoogroups.com> Onderwerp: [firebird-support] VIEW optimization Datum: do, apr. 7, 2016 18:34 Hi All, VIEW: CREATE VIEW VIEW1 AS SELECT RDB$RELATION_FIELDS.RDB$RELATION_NAME, RDB$FIELD_NAME FROM RDB$RELATION_FIELDS JOIN RDB$RELATIONS ON RDB$RELATION_FIELDS.RDB$RELATION_NAME=RDB$RELAT

Re: [firebird-support] VIEW optimization

2016-04-07 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
07.04.2016 18:34, Gabor Boros gaborbo...@yahoo.com [firebird-support] wrote: > Plan contains the JOIN but that not needed for the selected field. But it is needed to find out how many records with this value you'll get. -- WBR, SD.

[firebird-support] VIEW optimization

2016-04-07 Thread Gabor Boros gaborbo...@yahoo.com [firebird-support]
Hi All, VIEW: CREATE VIEW VIEW1 AS SELECT RDB$RELATION_FIELDS.RDB$RELATION_NAME, RDB$FIELD_NAME FROM RDB$RELATION_FIELDS JOIN RDB$RELATIONS ON RDB$RELATION_FIELDS.RDB$RELATION_NAME=RDB$RELATIONS.RDB$RELATION_NAME; SELECT: SELECT RDB$FIELD_NAME FROM VIEW1 PLAN: PLAN JOIN (VIEW1