Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL Hints under OpenVMS/Oracle version 7.1.3
cissmjg_at_njtransit.state.nj.us wrote:
>
> I have a query that runs under Personal Oracle (7.3) with no problem. The
> basic structure is as follows :
>
> SELECT /*+ FIRST_ROWS INDEX(indexname, specific_index) ORDERED #whatever
> */ . . FROM indexname, ..., ..., . . WHERE . . AND Rownum<480 . .
>
> When I attempt to run this under OpenVMS/Oracle (7.1.3), I received the
> first 479 rows in the !physical order! of the file. If I remove the
> Rownum statement, I receive ALL of the rows in the proper order.
>
> I checked the OPTIMIZER MODE and it is set to CHOOSE. I don't know if
> this is correct or not.
>
> Any help is appreciated. Thanks in advance!
>
> -------------------==== Posted via Deja News ====-----------------------
> http://www.dejanews.com/ Search, Read, Post to Usenet
The choose mode means that if the statistics are set in the user_tables and user_indexes for your query (your table and yours indexes), the statistics optimizer will run.
The SQL analyze command set the statistics in the dictionnary.
Have you try the explain plan or tkprof for determine what does oracle ?
-- _____________________________________ Jean-Claude Matarazzo France - Alsace email : jeanclaude.matarazzo_at_hol.fr ____________________________________Received on Tue Jul 08 1997 - 00:00:00 CDT