Subject | Re: Firebird Plan Analyzer |
---|---|
Author | kick_tisho |
Post date | 2005-05-13T11:04:31Z |
--- In firebird-support@yahoogroups.com, Svein Erling Tysvær
<svein.erling.tysvaer@k...> wrote:
and the select itself returns 40 params. It will be big code
duplication.
<svein.erling.tysvaer@k...> wrote:
> Hi Stanislav10
>
> > 2. To write my own plan for such big queries (more of them with
> > filters and more) seems like an absurduse
>
> This isn't possible, the query simply cannot use an index when you
> OR <something without an index>. If you want to use the indexwhere
> possible, you have to rewrite your procedure to something likeThe problem with this is that i have 20 filter params per procedure.
>
> IF (:P_IMPORTID IS NULL)
> BEGIN
> FOR
> SELECT
> C.ID
> FROM
> CONTACTS C
> DO
> SUSPEND;
> END
> ELSE
> BEGIN
> FOR
> SELECT
> C.ID
> FROM
> CONTACTS C
> WHERE (C.IMPORTID = :P_IMPORTID)
> DO
> SUSPEND;
> END
> END;
>
> HTH,
> Set
and the select itself returns 40 params. It will be big code
duplication.