Subject | Re: Firebird Plan Analyzer |
---|---|
Author | Svein Erling Tysvær |
Post date | 2005-05-13T13:18:35Z |
--- In firebird-support@yahoogroups.com, "kick_tisho" wrote:
guess is that this will be way slower than using no index at all.
Sorry,
Set
> One friend just propose me somethingTo me, that seems like a bad way to force the use of an index. My
>
> IF (:P_IMPORTID IS NULL) THEN P_IMPORTID = 0;
>
> FOR
> SELECT
> P.ID
> FROM PERSONS p
> WHERE
> (:P_IMPORTID > 0 AND P.IMPORTID = :P_IMPORTID)
> or (:P_IMPORTID = 0 AND P.ID > 0)
> INTO :PERSONID
> DO
> SUSPEND;
>
> now it uses the importid index, but and the PK index
guess is that this will be way slower than using no index at all.
Sorry,
Set