Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LOB prefetch does not work #225

Closed
kogan69 opened this issue Oct 18, 2017 · 3 comments
Closed

LOB prefetch does not work #225

kogan69 opened this issue Oct 18, 2017 · 3 comments

Comments

@kogan69
Copy link

kogan69 commented Oct 18, 2017

Selecting from table with one column of type CLOB turned to be really slow. This is critical problem for us, since our application uses many tables with a clob columns of rather small size.

I've tried to look in the source code for something similar to what's described in:
https://docs.oracle.com/cd/B28359_01/appdev.111/b28395/oci07lob.htm#CHDDHFAB
, but could just find the setting of OCI_ATTR_LOBPREFETCH_LENGTH to TRUE in the defLob.go:define function.
I've tried to modify the code myself as it's described in the Oracle's article, to set the OCI_ATTR_LOBPREFETCH_SIZE on the session, but this had no effect on the performance.
I've also tried to set these attributes in the alloc() function of defLob, but also failed miserably :((

May be someone can point me to the right direction so I could implement the change and create a pull request?

With many thanks in advance!
LK

@tgulacsi
Copy link
Collaborator

The session default OCI_ATTR_DEFAULT_LOBPREFETCH_SIZE is already set in srv.go#L258 to lobChunkSize = 1MiB.
The OCI_ATTR_LOBPREFETCH_LENGTH is set on the LOB to force OCI to prefetch the LOB's length (metadata).

What is your select? How big those LOBs are? What is the usage pattern?
What are you doing with the returned LOB?

@kogan69
Copy link
Author

kogan69 commented Oct 19, 2017 via email

@kogan69
Copy link
Author

kogan69 commented Oct 23, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants