Skip to Content
author's profile photo Former Member
Former Member

select query with index acess

Hello,

Please give me some code with using index acess ( please high light the index)

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 27, 2007 at 04:44 AM

    SELECT carrid connid cityfrom

    FROM spfli INTO (xcarrid, xconnid, xcityfrom)

    WHERE carrid = 'LH ' AND cityfrom = 'FRANKFURT'

    <b>%_HINTS ORACLE 'INDEX("SPFLI" "SPFLI~001")'.</b>

    WRITE: / xcarrid, xconnid, xcityfrom.

    ENDSELECT.

    chk this

    select-using-secondary-index

    Message was edited by:

    Chandrasekhar Jagarlamudi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 27, 2007 at 04:46 AM

    The database optimizer will automatically select an index for your SELECT query depending on certain rules. However if you want to force it to use a particular index you can specify the index in the SELECT query using the HINTS keyword. I do not have the exact syntax but you can search it on SDN.

    ~Kiran

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.