Print Thread
Any way to "lazy load" CLOB data?
#59262 12/20/18 04:23 PM
Joined: Dec 2018
Posts: 8
D
David S Offline OP
Member
OP Offline
Member
D
Joined: Dec 2018
Posts: 8
I'm noticing that the presence of CLOB fields significantly impacts performance when loading a table.

I've got a field being used in memos where the vast majority of the records have fairly small amounts of data in that field. However, there are a handful that are over 4000, making it impossible to use a varchar2 field. So I set it as a CLOB, but that really slows down startup when I open the table. (I do a select * from xxx)

Is there any way to "lazy load" CLOB data until I actually load a specific record? Other than splitting that field into a separate table and explicitly loading it for only that record as it's referenced?

Last edited by David S; 12/20/18 04:25 PM.
Re: Any way to "lazy load" CLOB data?
David S #59263 12/20/18 05:58 PM
Joined: Dec 2018
Posts: 8
D
David S Offline OP
Member
OP Offline
Member
D
Joined: Dec 2018
Posts: 8
Would it work to create a virtual (calculated) field that's used instead of the CLOB field? Would I need to list the fields in the table's SQL property rather than "select *"?

At program load time, I can display nothing. But once the program has started up, the calc field can explicitly load from the CLOB field.

But what happens if I want to update the value of the CLOB field? How does a calc field deal with that?

Re: Any way to "lazy load" CLOB data?
David S #59274 12/21/18 10:23 AM
Joined: Aug 1999
Posts: 22,194
Member
Offline
Member
Joined: Aug 1999
Posts: 22,194
I think the best method is to exclude the CLOB from the query, and explicitly fetch and display the CLOB data when the user visits a record.


Marco Kalter
Allround Automations
Re: Any way to "lazy load" CLOB data?
Marco Kalter #59285 12/21/18 05:08 PM
Joined: Dec 2018
Posts: 8
D
David S Offline OP
Member
OP Offline
Member
D
Joined: Dec 2018
Posts: 8
Is there a way to exclude a single field when you use "select * from xxx"?

Re: Any way to "lazy load" CLOB data?
David S #59286 12/21/18 06:19 PM
Joined: Aug 1999
Posts: 22,194
Member
Offline
Member
Joined: Aug 1999
Posts: 22,194
No, you would have to explicitly include all columns except the CLOB column.


Marco Kalter
Allround Automations

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.072s Queries: 15 (0.021s) Memory: 2.5121 MB (Peak: 3.0377 MB) Data Comp: Off Server Time: 2024-04-16 11:08:32 UTC
Valid HTML 5 and Valid CSS