Subject | Re: [firebird-support] Re: one query works, the other never comes back |
---|---|
Author | Helen Borrie |
Post date | 2012-07-06T21:58:04Z |
At 08:22 AM 7/07/2012, you wrote:
./hb
>The plan is similar, only reversed.Just a thought then - if those "match" fields were Paradox NUMERIC, that have been imported as FLOAT or DOUBLE PRECISION, then you almost certainly won't get matches for all pairs that you think of as "equal". Floating point types should never be keys, for this very reason. The fact that the optimizer is avoiding those PK indexes doesn't change that - they won't magically become "equal" or start pretending to be SQL NUMERIC or DECIMAL.
>
>Performant query:
>PLAN JOIN (COMMISSIONS NATURAL, TRANSACTIONS NATURAL)
>
>Non-performant query:
>PLAN JOIN (TRANSACTIONS NATURAL, COMMISSIONS NATURAL)
>
>
>There is no physical relationship between these tables as they were migrated from Paradox.
./hb