mattn / go-oci8

Oracle driver for Go using database/sql
https://mattn.kaoriya.net/
MIT License
630 stars 212 forks source link

Please increase default prefetchMemory setting #412

Closed ukolovda closed 3 years ago

ukolovda commented 3 years ago

Hello! SELECT from my DB works very slow with default prefetcj memory settings. I increase prefetch_memory to 512000. Full select time was reduced from 10 hours to 15 minutes (about 20M rows).

i think, default prefetch size 4096 is to low for most tasks, and we can increase default value to 65536 without any risk. Also It may be useful if we can change this value before SELECT call, not only in connection string parameter.

MichaelS11 commented 3 years ago

Please use the prefetch_memory setting to set the prefetch size to what you would like. https://pkg.go.dev/github.com/mattn/go-oci8#ParseDSN

What works for you may not work for everyone. It depends on what type of queries are being run and the latency to the database.

MichaelS11 commented 3 years ago

If there is nothing else, please close this issue.