[Interest] [Help]A big problem about accessing database using OCI driver plugin from qt application.
Lincoln Ramsay
a1291762 at gmail.com
Tue Oct 30 11:13:19 CET 2012
On 30/10/12 5:25 PM, Xiaognag Wang wrote:
> You mean this big difference (7 seconds and 30 millisecond ) was
> caused by cache?
Oh yes. There's a big difference between having 1 chunk of data sent
from the server to the client and having the client poll the server
every time your app says fetchNext(); The effect becomes even more
pronounced as you increase the latency between your app and the database
server (eg. if it's on a network instead of on the local machine).
> In my testing, query.next() just retured 256 records.
> and I can not find methods to set cache enable in qt, should I set
> cache at oracle side?
If you're using oracle, you want to look at OCI_ATTR_PREFETCH_ROWS
and/or OCI_ATTR_PREFETCH_MEMORY. See QSqlDatabase::setConnectOptions().
--
Link
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20121030/7b417727/attachment.html>
More information about the Interest
mailing list