Received: (qmail 12351 invoked from network); 2 Feb 2011 12:23:50 -0600
Received: from freelists-180.iquest.net (HELO turing.freelists.org) (206.53.239.180)
  by static-ip-85-25-126-90.inaddr.intergenia.de with SMTP; 2 Feb 2011 12:23:45 -0600
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 0BDC2D646F5;
 Wed,  2 Feb 2011 13:23:33 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=freelists.org;
 s=turing; t=1296671013; bh=Yp/SHCvfEfAq6OS+WLOfIRfA0G91gJ6ZhnLYRcmX
 a8k=; h=From:To:Date:Subject:Message-ID:References:In-Reply-To:
	 Content-Type:Content-Transfer-Encoding:MIME-Version:Sender:
	 Reply-To:List-help:List-unsubscribe:List-Id:List-subscribe:
	 List-owner:List-post:List-archive; b=hCbAaIBaz4G+QbN/E6gmY+VP+rXU3
 lc4YuHWFQpV6oVNNCLLqfbxbh05cIpNbla+voIlQ9AwZkwa9KBQOHjVcIOfHQaxnXRU
 XDZfoXedc8bKA0UFTMoEtZfSe4EOLZhJFWDPEJUOiSara3ughC0aZNG1SgLgbKO72/Q
 3gXddaTQ=
X-Virus-Scanned: Debian amavisd-new at localhost.localdomain
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id fdBbi9PtJWjE; Wed,  2 Feb 2011 13:23:32 -0500 (EST)
Received: from turing.freelists.org (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id AB407D6449C;
 Wed,  2 Feb 2011 13:22:48 -0500 (EST)
Received: with ECARTIS (v1.0.0; list oracle-l); Wed, 02 Feb 2011 13:22:07 -0500 (EST)
Received: from localhost (localhost [127.0.0.1])	by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 2323AD6463C	for <oracle-l@freelists.org>; Wed,  2 Feb 2011 13:22:07 -0500 (EST)
Received: from turing.freelists.org ([127.0.0.1])	by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024)	with ESMTP id auJw4If4yR0Q for <oracle-l@freelists.org>;	Wed,  2 Feb 2011 13:22:07 -0500 (EST)
Received: from VA3EHSOBE006.bigfish.com (va3ehsobe006.messaging.microsoft.com [216.32.180.16])	by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 78A97D6465C	for <oracle-l@freelists.org>; Wed,  2 Feb 2011 13:21:59 -0500 (EST)
Received: from mail14-va3-R.bigfish.com (10.7.14.238) by VA3EHSOBE006.bigfish.com (10.7.40.26) with Microsoft SMTP Server id 14.1.225.8; Wed, 2 Feb 2011 18:21:54 +0000
Received: from mail14-va3 (localhost.localdomain [127.0.0.1])	by mail14-va3-R.bigfish.com (Postfix) with ESMTP id 3B250C4053C;	Wed,  2 Feb 2011 18:21:54 +0000 (UTC)
X-SpamScore: -37
X-BigFish: VPS-37(zz2de7MfcbW542N9371P62a3Lzz1202hz31iz8275bh8275dhz2dh2a8h668h61h)
X-Spam-TCS-SCL: 0:0
X-Forefront-Antispam-Report: KIP:(null);UIP:(null);IPVD:NLI;H:SPOBMEXC06.adprod.directory;RD:smtp.ingramindustries.com;EFVD:NLI
Received: from mail14-va3 (localhost.localdomain [127.0.0.1]) by mail14-va3 (MessageSwitch) id 1296670913380873_1433; Wed,  2 Feb 2011 18:21:53 +0000 (UTC)
Received: from VA3EHSMHS019.bigfish.com (unknown [10.7.14.246])	by mail14-va3.bigfish.com (Postfix) with ESMTP id 523B0144804F;	Wed,  2 Feb 2011 18:21:53 +0000 (UTC)
Received: from SPOBMEXC06.adprod.directory (12.23.250.36) by VA3EHSMHS019.bigfish.com (10.7.99.29) with Microsoft SMTP Server (TLS) id 14.1.225.8; Wed, 2 Feb 2011 18:21:49 +0000
Received: from SPOBMEXC14.adprod.directory ([169.254.1.59]) by SPOBMEXC06.adprod.directory ([10.1.13.96]) with mapi; Wed, 2 Feb 2011 12:21:47 -0600
From: "Taylor, Chris David" <ChrisDavid.Taylor@ingrambarge.com>
To: "'Dave.Herring@acxiom.com'" <Dave.Herring@acxiom.com>,	"'oracle-l@freelists.org'" <oracle-l@freelists.org>
Date: Wed, 2 Feb 2011 12:20:18 -0600
Subject: RE: 16kb limit w/ CLOB and LIKE
Thread-Topic: 16kb limit w/ CLOB and LIKE
Message-ID: <C5533BD628A9524496D63801704AE56D68C9B95DC0@SPOBMEXC14.adprod.directory>
References: <BD475CE0B3EE894DA0CAB36CE2F7DEB4019A59@LITIGMBCRP02.Corp.Acxiom.net>
In-Reply-To: <BD475CE0B3EE894DA0CAB36CE2F7DEB4019A59@LITIGMBCRP02.Corp.Acxiom.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by Ecartis
MIME-Version: 1.0
X-OriginatorOrg: ingrambarge.com
X-archive-position: 34089
X-ecartis-version: Ecartis v1.0.0
Sender: oracle-l-bounce@freelists.org
Errors-to: oracle-l-bounce@freelists.org
X-original-sender: ChrisDavid.Taylor@ingrambarge.com
Precedence: normal
Reply-To: ChrisDavid.Taylor@ingrambarge.com
List-help: <mailto:ecartis@freelists.org?Subject=help>
List-unsubscribe: <oracle-l-request@freelists.org?Subject=unsubscribe>
List-software: Ecartis version 1.0.0
List-Id: oracle-l <oracle-l.freelists.org>
X-List-ID: oracle-l <oracle-l.freelists.org>
List-subscribe: <oracle-l-request@freelists.org?Subject=subscribe>
List-owner: <mailto:steve.adams@ixora.com.au>
List-post: <mailto:oracle-l@freelists.org>
List-archive: <http://www.freelists.org/archives/oracle-l>
X-list: oracle-l

I hadn't considered that LIKE might work on only parts of a field - I would rather it didn't work at all then partially work.
So, I learned something there.

I think you can use some of the DBMS_LOB functions to get at what you want though.

Dbms_lob.instr(clob_field, 'text to search',1,1) > 0, or dbms_lob.substr maybe.



Chris Taylor
Sr. Oracle DBA
Ingram Barge Company
Nashville, TN 37205
Office: 615-517-3355
Cell: 615-663-1673
Email: chris.taylor@ingrambarge.com
 
CONFIDENTIALITY NOTICE: This e-mail and any attachments are confidential and may also be privileged. If you are not the named recipient, please notify the sender immediately and delete the contents of this message without disclosing the contents to anyone, using them for any purpose, or storing or copying the information on any medium.


-----Original Message-----
From: oracle-l-bounce@freelists.org [mailto:oracle-l-bounce@freelists.org] On Behalf Of Herring Dave - dherri
Sent: Tuesday, February 01, 2011 1:37 PM
To: oracle-l@freelists.org
Subject: 16kb limit w/ CLOB and LIKE

This may have been raised before and if so, I apologize for the duplication, but I found what appears to be a 16KB limit when filtering CLOBs off a LIKE comparison (10.2.0.2 on Linux RHEL 4.x).  So if you were to filter on a CLOB column with something similar to "... AND sql_text LIKE '%<blah blah>%' ...", you'll get false matches if "blah" doesn't show up until after 16KB of the CLOB.

I ran into this searching DBA_HIST_SQLTEXT, checking for certain statement patterns.  To prove to me what was going on, I picked a statement that DOES NOT include the string DAVE.BOGUS_TABLE and is over 16KB in length (actually around 27KB).

Here's my test:

CREATE TABLE dch_test_tb (stmt_len NUMBER, sql_text CLOB); TRUNCATE TABLE dch_test_tb;

DECLARE
   v_line_length NUMBER := 100;
   v_offset      NUMBER := 1;
   v_temp_clob   CLOB;
   v_insert_clob CLOB;
BEGIN
   SELECT sql_text INTO v_temp_clob
     FROM dba_hist_sqltext
    WHERE sql_id = '<known SQL_ID mentioned above>';

   WHILE v_offset <= 28000
   LOOP
      v_insert_clob := v_insert_clob || TO_CLOB(DBMS_LOB.SUBSTR(v_temp_clob, v_line_length, v_offset));
      INSERT INTO dch_test_tb VALUES (v_line_length, v_insert_clob);
      COMMIT;
      v_offset := v_offset + 100;
   END LOOP;
   COMMIT;
END;
/

SELECT LENGTH(sql_text)
  FROM dch_test_tb
 WHERE UPPER(sql_text) LIKE 'SELECT%DAVE.BOGUS_TABLE%'
 ORDER BY 1;

-------------------Output--------------------------

16400
16500
16600
16700
	...
27203

This isn't a huge issue now for me, as REGEXP_LIKE works but is slower.  I just thought others should know about this in case they didn't already.

DAVID HERRING
DBA
Acxiom Corporation
EML   dave.herring@acxiom.com
TEL    630.944.4762
MBL   630.430.5988
1501 Opus Pl, Downers Grove, IL 60515, USA WWW.ACXIOM.COM  

The information contained in this communication is confidential, is intended only for the use of the recipient named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please resend this communication to the sender and delete the original message or any copy of it from your computer system. Thank you.

--
http://www.freelists.org/webpage/oracle-l




--
http://www.freelists.org/webpage/oracle-l


