Subject | Re: [ib-support] Re: Plan not working |
---|---|
Author | Paul Reeves |
Post date | 2001-11-02T12:52:42Z |
rod@... wrote:
select * from employee
where job_code='Eng'
order by last_name, first_name;
which is semantically the same query. There is a NAMEX index on last_name,
first_name and the plan generated is
PLAN (EMPLOYEE ORDER NAMEX)
This is actually tested against a very early version of Firebird, so I doubt
that it differs too much from InterBase. So, given that there is a consensus
that the plan should use the index for this type of query, what is it about
your database that is confounding this?
I guess we should start at the beginning - O/S, IB/Fb version, double check
the indexes exits and are active, phase of the moon etc.
Paul
--
Paul Reeves
http://www.ibphoenix.com
taking InterBase further
>Well I just tried this:
> yes - that is the exact command.
>
> In fact any table I use where I would use an index is not being
> chosen. Interbase always uses Plan Natural...
>
select * from employee
where job_code='Eng'
order by last_name, first_name;
which is semantically the same query. There is a NAMEX index on last_name,
first_name and the plan generated is
PLAN (EMPLOYEE ORDER NAMEX)
This is actually tested against a very early version of Firebird, so I doubt
that it differs too much from InterBase. So, given that there is a consensus
that the plan should use the index for this type of query, what is it about
your database that is confounding this?
I guess we should start at the beginning - O/S, IB/Fb version, double check
the indexes exits and are active, phase of the moon etc.
Paul
--
Paul Reeves
http://www.ibphoenix.com
taking InterBase further