Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 19th, 2005, 11:20 PM
Mat Hess
Guest
 
Posts: n/a
Default 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
  #2  
Old July 19th, 2005, 11:20 PM
DA Morgan
Guest
 
Posts: n/a
Default Re: CLOB: Why are they so slow (compared with VARCHAR2)

Mat Hess wrote:[color=blue]
> 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[/color]

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
damorgan@x.washington.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 =---
 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles