Subject Re: newbie question
Author jaybirdbsu
--- In firebird-support@yahoogroups.com, "Ann W. Harrison"
<aharrison@i...> wrote:
> At 04:19 PM 8/31/2004, jaybirdbsu wrote:
> >Hello all,
> > I am new to firebird and SQL so I am sure this is a stupid
> >question but here goes anyway. I have the following two tables
> >
> >Table1
> > KEY DESCRIPTION
> > ------- -------------------
> > ZZZA Simple Description one
> > ZZZB Simple Description 2
> > ZZAA Another Desc 1
> > ZZAB Another Desc 2
> >
> >Table2
> > misc cols... Simple Another
> > ------------ -------- ---------
> > blah blah ZZZA ZZAB
> > ...
>
> Not my favorite, but subselects are probably the way to
> go with this:
>
>
> select <misc cols ...>,
> (select t1a.description
> from table1 t1a
> where t1a.key = t2.simple) as simple,
> (select t1b.description
> from table1 t1b
> where t1b.key = t2.another) as another
> from table2 t2
>
>
> regards,
>
>
> Ann
Ann,
I finished implementing this and it takes a minute and a half to
run the query. Would there be any performance advantages to making
this query into a view?

Thanks

Jay