Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Query from Forms not using Index
Użytkownik Mark napisał:
> Hi, The following query is produced by an Oracle Forms application :
>
> SELECT {multiple_columns)
> FROM gg_inbox
> WHERE ind_order_id = :1
> ORDER BY entered_gg_date DESC;
>
> this query does a full table scan of the table in question when there
> is an index associated with ind_order_id column. When I run the query
> manually in SQLPlus like below :
>
> SELECT {multiple_columns)
> FROM gg_inbox
> WHERE ind_order_id = '111236441'
> ORDER BY entered_gg_date DESC;
>
> the index is used and the result comes back instantly. Does anybody
> know why it is not using the index in the Forms application? Any help
> would be greatly appreciated.
>
What made you think, that form does full table scan? I don't know, if you create 'WHERE' clause dynamiccaly or you just enter ind_order_id into form field and execute query. I don't know, what triggers are on main block of form. I wonder, what if ':1' is null.
-- NoelReceived on Tue Apr 19 2005 - 03:57:16 CDT