Subject | Re: [firebird-support] strange plan |
---|---|
Author | Lucas Franzen |
Post date | 2004-07-29T13:40:15Z |
Hi Markus,
Markus Ostenried schrieb:
Your query is the same as:
SELECT *
FROM MSG
WHERE
MSG_ID_MSG = 54 OR
MSG_ID_MSG = 93 OR
MSG_ID_MSG = 586 OR
MSG_ID_MSG = 1626 OR
...
So for each WHERE item the PLAN is RDB$PRIMARY58, your primary key on
MSG_ID_MSG.
Looks okay to me.
Luc.
Markus Ostenried schrieb:
> Hi,Why not?
>
> when I execute this statement in IB_SQL, WinXP Pro, FB SS 1.5.1
>
> SELECT *
> FROM MSG
> WHERE MSG_ID_MSG IN
> (54,93,586,1626,2350,2985,7339,7704,7892,8198,8570,8994,9123,9316,9610,9674,9835)
>
>
> I get this plan:
> PLAN (MSG INDEX
> (RDB$PRIMARY58,RDB$PRIMARY58,RDB$PRIMARY58,RDB$PRIMARY58,RDB$PRIMARY58,RDB$PRIMARY58,RDB$PRIMARY58,RDB$PRIMARY58,RDB$PRIMARY58,RDB$PRIMARY58,RDB$PRIMARY58,RDB$PRIMARY58,RDB$PRIMARY58,RDB$PRIMARY58,RDB$PRIMARY58,RDB$PRIMARY58,RDB$PRIMARY58))
>
> The field MSG_ID_MSG is the PK of table MSG.
> Just wondering if this kind of plan is normal...
Your query is the same as:
SELECT *
FROM MSG
WHERE
MSG_ID_MSG = 54 OR
MSG_ID_MSG = 93 OR
MSG_ID_MSG = 586 OR
MSG_ID_MSG = 1626 OR
...
So for each WHERE item the PLAN is RDB$PRIMARY58, your primary key on
MSG_ID_MSG.
Looks okay to me.
Luc.