Subject | RE: [ib-support] Join, SP and ORDER BY: strange behaviour |
---|---|
Author | Leyne, Sean |
Post date | 2001-03-12T01:44:23Z |
Nando,
It would be recommended that you post a complete example first, so that
others can review and perhaps test your query, before you post it as a
bug.
It's not that Firebird is afraid of bugs, but we generally recommend
confirmation before hand.
Sean
It would be recommended that you post a complete example first, so that
others can review and perhaps test your query, before you post it as a
bug.
It's not that Firebird is afraid of bugs, but we generally recommend
confirmation before hand.
Sean
> -----Original Message-----
> From: Nando Dessena [mailto:nandod@...]
> Sent: Sunday, March 11, 2001 2:42 PM
> To: ib-support@yahoogroups.com
> Subject: Re: [ib-support] Join, SP and ORDER BY: strange behaviour
>
>
> I wrote
>
> > for some reason I have to code an inner join like this:
> >
> > select A.*
> > from ATABLE A join ASTOREDPROC(<parameters>) SP
> > on A.KEYFIELD = SP.KEYFIELD
> > order by A.AFIELD
> >
> > Let ASTOREDPROC be a stored procedure that simply performs
> for select
> > KEYFIELD from ATABLE into ... do.
> >
> > The resultset is NOT ordered by A.AFIELD if AFIELD is
> indexed, unless it
> > is KEYFIELD (I have 4 indexes on ATABLE: one on KEYFIELD
> and three on
> > three other fields, one field each: the order by won't work on those
> > three only).
> >
> > The problem goes away if I:
> > - request a descending sort, or
> > - use a left join (SP left join table, which in my case is
> equivalent),
> > or
> > - remove/deactivate the index, or
> > - remove the join with the SP
> >
> > As a side note, if I use a left join (which is what I am
> planning to do
> > if no better solution arises), the plan shown says IB is
> not using the
> > existing index for sorting (IB knows better than me anyway,
> I suppose).
> > I am using IB5.6.
> > Sounds like a bug of some kind.
> > Any thoughs?
>
> Hasn't anyone anything to say about it? Should I try to generate a
> reproducible test case with the latest FB build and
> optionally submit a
> bug report?
> --
> ____
> _/\/ando
>
> ------------------------ Yahoo! Groups Sponsor
> ---------------------~-~>
> Make good on the promise you made at graduation to keep
> in touch. Classmates.com has over 14 million registered
> high school alumni--chances are you'll find your friends!
> http://us.click.yahoo.com/l3joGB/DMUCAA/4ihDAA/d8AVlB/TM
> --------------------------------------------------------------
> -------_->
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>