Hello,
Your solution is great.When I set OCI_ATTR_PREFETCH_ROWS option, the accessing 
speed becomes so fast. Thank you so much :)
Have good time!BR,Eric2012.10.31
Date: Tue, 30 Oct 2012 20:13:19 +1000
From: a1291...@gmail.com
To: xiaogangwang2...@hotmail.com; interest@qt-project.org
Subject: Re: [Interest] [Help]A big problem about accessing database using OCI 
driver plugin from qt application.‏


  
    
  
  
    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
                                          
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to