473,569 Members | 2,731 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CLOB: Why are they so slow (compared with VARCHAR2)

We are currently developing a new application. In this application, we
have a table which will hold a large number of rows, where many text
fields (one text field per row) will be stored. The users would prefer
to have an unlimited field size (in spite of the fact that most of all
fields have much less than 4000 characters), so we chose CLOB as the
datatype of the corresponding column.

We experienced very poor performance when we were using CLOB field,
compared with VARCHAR2. Please try the following:

create table test (test_text clob)
/
insert into test values ('this is just a test')
-- REPEAT THE INSERT 2000 TIMES
/

In my Database, a SELECT * FROM test takes 0.890 seconds.
If I run the same script, but use VARCHAR2(4000) for the test_text
column, then the SELECT takes only 0.031 seconds.

My Questions:
1. Why are CLOBS so slow ?
2. Is there a way to improve the performance of the CLOB Fields ?

Kind Regards
Mat Hess
Jul 19 '05 #1
1 13265
Mat Hess wrote:
We are currently developing a new application. In this application, we
have a table which will hold a large number of rows, where many text
fields (one text field per row) will be stored. The users would prefer
to have an unlimited field size (in spite of the fact that most of all
fields have much less than 4000 characters), so we chose CLOB as the
datatype of the corresponding column.

We experienced very poor performance when we were using CLOB field,
compared with VARCHAR2. Please try the following:

create table test (test_text clob)
/
insert into test values ('this is just a test')
-- REPEAT THE INSERT 2000 TIMES
/

In my Database, a SELECT * FROM test takes 0.890 seconds.
If I run the same script, but use VARCHAR2(4000) for the test_text
column, then the SELECT takes only 0.031 seconds.

My Questions:
1. Why are CLOBS so slow ?
2. Is there a way to improve the performance of the CLOB Fields ?

Kind Regards
Mat Hess


And your Oracle version is?
And running StatsPack and looking at waits reveals?
And the difference in speed is a real or theoretical problem?
--
Daniel A. Morgan
University of Washington
da******@x.wash ington.edu
(replace 'x' with 'u' to respond)
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2617
by: freak | last post by:
hi i have problems reading an oracle(9i) clob from a php-script with the MDB-class from pear. the table files has 3 fields: id integer document clob picture clob
2
10536
by: Rob Panosh | last post by:
Hello, I am having trouble moving data from a CLOB to a NCLOB column. My current table structure for table fmattachmentembed: -------------------------------------------------------- fmattachmentid number(10,0) not null, fmvalue clob null, fmextension varchar2(4) null, fmsize number(8,0) null
1
11481
by: Chris | last post by:
I use websphere connection pooling and had a failure attempting a CLOB.createTemporary. tempClob = CLOB.createTemporary(conn, true, CLOB.DURATION_SESSION); Here's an excerpt of the exception and stack-trace. java.lang.ClassCastException: com.ibm.ejs.cm.proxy.OracleConnectionProxy at...
8
2873
by: Neil | last post by:
I have a very puzzling situation with a database. It's an Access 2000 mdb with a SQL 7 back end, with forms bound using ODBC linked tables. At our remote location (accessed via a T1 line) the time it took to go to a record was very slow. The go to mechanism was a box that the user typed the index value into a combo box, with very simple code...
1
16210
by: DJ DIGI | last post by:
Hello Everyone, I'm attempting to design a small web app to obtain customer feedback. The issue is when a user inputs >4000 characters in the COMMENTS section I get the following Err Msg: ORA-01704: string literal too long. I am using Visual Studio.Net 2003 (vb as language), SQL+ to create tables in Oracle 9i, and Access to just link...
8
4990
by: gimme_this_gimme_that | last post by:
I have the following Java code : package com.rhi.bb.udf.utils; import java.sql.Clob; import java.sql.SQLException; import java.util.regex.Pattern; import java.util.regex.Matcher;
3
9044
by: Gox | last post by:
Hi. This is my situation: Backend: Oracle 8i Frontend: MS Access 2k (ODBC driver support LOBs) Q: How insert (upload) a CLOB (pdf or doc file) to an Oracle using MS access (form)?? Q: How display (download) a CLOB (pdf or doc file) from Oracle using MS access (form)??
5
7217
by: jonceramic | last post by:
Hi All, I started developing in Access, and people took notice and so we're starting to migrate into our corporate's bigger Oracle system. I'll still be using my developed Access front ends, but will be migrating my back ends to Oracle ODBC. 1. Does anyone have recommendations for books or web resources for general...
1
1774
by: Mat Hess | last post by:
We are currently developing a new application. In this application, we have a table which will hold a large number of rows, where many text fields (one text field per row) will be stored. The users would prefer to have an unlimited field size (in spite of the fact that most of all fields have much less than 4000 characters), so we chose CLOB...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7970
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6284
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5513
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1213
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.