DBAsupport.com Forums - Powered by vBulletin
Results 1 to 10 of 10

Thread: Quick Question I Hope

  1. #1

    Quick Question I Hope, non-sargable expr

    I'm coming from a MS SqlServer background. I have an Oracle project I've been asked to work on. Does Oracle SQL have optimization restrictions on where clauses that would make the query non-sargable?

    For example: select * from table where x <> y
    Under MSSQL the "not equal to" would make the clause non-sargable by the query optimizer.

    Thanks
    Last edited by Bruce Trimpop; 03-22-2004 at 03:07 PM.

  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    WTF is sargable?
    Jeff Hunter

  3. #3
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    yes, it's sargable.
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  4. #4
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    Originally posted by marist89
    WTF is sargable?
    Hey, STFW buddy!

    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  5. #5

    Sargable defined!!

    Sorry, MS term for searchable arguments, SARGable meaning an index will be used, non-SARGable meaning an index won't be used.

    This tends to be one of those issues that's darned hard to find info, I was hoping to shortcut the search by asking here first.

    Thanks

  6. #6
    Thanks slimedave. Is there particular documentation you can point me to that would cover this topic?

    Thanks

  7. #7
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    you could look at the Concepts Guide and the Performance documents at http://tahiti.oracle.com for details of the optimizer.

    Have a look at index hints also ... you might find that you have to prompt the use of an index to get the optimizer to use it.
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  8. #8
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Originally posted by slimdave
    Hey, STFW buddy!

    ..|.. (A New Jersey horn for those of you that don't know x-rated emoticons)
    Jeff Hunter

  9. #9
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    Originally posted by marist89
    ..|.. (A New Jersey horn for those of you that don't know x-rated emoticons)
    In my country, we say ..V.
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  10. #10
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    Originally posted by slimdave
    In my country, we say ..V.
    Slim, it's things like that that show you up as a foreigner. I can swear in French as well as any, but when I get exited it's two fingers and they know at once . . .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width