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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Performance Difference Between != and <>?

RE: Performance Difference Between != and <>?

From: Hemant K Chitale <hkchital_at_singnet.com.sg>
Date: Mon, 25 Sep 2006 21:12:07 +0800
Message-Id: <7.0.1.0.0.20060925210944.01b91780@singnet.com.sg>

Do you have any Stored Outline ? Stored Outlines do _exact_ (literal) matches
so if you have one Stored Outline for, say, the SQL with a "!=" and none for the SQL with a "<>" (or a vice versa), the Stored Outline might be using hints ? (although, come to think of it, your EXPLAIN PLAN should have shown the hints if executing a Stored Outline ?)

At 08:32 PM Monday, Scott Canaan wrote:
>Jonathan,
> Thank you for your answer. We did do an explain plan on both
>versions of the statement and they were identical, which is what is so
>puzzling about this.
>----- Original Message -----
>From: "Scott Canaan" <srcdco_at_rit.edu>
>To: <oracle-l_at_freelists.org>
>Sent: Friday, September 22, 2006 9:20 PM
>Subject: Performance Difference Between != and <>?
>
>
> Does anyone know why there's a big performance difference when using
>!= vs. <>? I was just looking at a query that was written both ways and
>there is a big difference in how long it takes to return data. The
>query is:
>
>
>
>Select count(*) from claws_doc_table where claws_doc_id = :id and exists
>(select 1 from claws_person_id where status != 0);
>
>
>
>If you use !=, it returns sub-second. If you use <>, it takes 7 seconds
>to return. Both return the right answer. I've looked in the Oracle
>documentation and can't find anything that would explain this. The
>documentation says that they are interchangeable.
>
>

Hemant K Chitale
http://web.singnet.com.sg/~hkchital

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Sep 25 2006 - 08:12:07 CDT

Original text of this message

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