Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: my problem with

Re: my problem with

From: Sybrand Bakker <sybrandb_at_hccnet.nl>
Date: Mon, 30 Aug 2004 16:28:19 +0200
Message-ID: <20e6j05mbn7m721f0tkd8bepqu3m9c97fe@4ax.com>


On Mon, 30 Aug 2004 15:57:33 +0200, "dead" <OVOIZBACI-vlasic_at_vodatel.net> wrote:

>You didn't understend what I need. User of my application have to see
>records in order by Field1 but only records with first 50 values of that
>field, that's meen records with value from '000001' to '000050'
>You can try to insert records in nonsequenced order and you will see that.
>
>Does you now is any oracle command that I say database to use index in some
>query?

Actually your statement is simply incorrect, or you are telling fairy tales.
Why would the 'first' 50 records have f1 ranging from '00001'to '00050'
If you are using rownum, you'll get the first 50 records of the resultset. In the first query you perform a full table scan limited by rownum. There is *NO*, I repeat, *NO GUARANTEE* at all, the records which are *logically* first, are also *physically* first. That's why I said: your approach is going to fail sooner or later. The truth is you didn't understand my answer and your statement is simply incorrect. If you need records numbered from '00001' to '000050', you need to have an appropiate where clause. ROWNUM is not a replacement for using an appropiate where clause.

As to your question: please look up using HINTS in the Oracle documentation,
and do something about your English: it is so bad, it is almost incomprehensible. 'Does you now is' does not constitute a correct grammatical unit in any fashion.

--
Sybrand Bakker, Senior Oracle DBA
Received on Mon Aug 30 2004 - 09:28:19 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US