Which ODBC driver are you using? (Qt or native C++ driver?) Most likely, you are using the Qt for the Oracle and native C++ for the odbc… Qt’s system if used improperly can add quite a bit of overhead.
First, how often are you creating your QSqlQuery’s? Next, QVariant, while as fast as most variant system, can still be slower than raw “union based” casts that many native C++ interfaces provide.. However, make sure your calls to the SQL engine are using the correct types and NOT relying on the qvariant conversions.. ie, don’t send back a string to convert to an integer.. Without seeing code, its gonna be hard to diagnose further. Scott From: interest-bounces+scott=onshorecs....@qt-project.org [mailto:interest-bounces+scott=onshorecs....@qt-project.org] On Behalf Of Xiaognag Wang Sent: Monday, October 29, 2012 10:23 AM To: qt-interest Subject: [Interest] [Help]A big problem about accessing database using OCI driver plugin from qt application. Dear All, I meet a big problem need your help: 1. my evnriomnent: Win7 + Qt-SDK1.2.1 + oracle11g_home2 2. I compiled oci driver plugin for accessing Oracle database from qt applicatio n. 3. the problem is: it is too slow to get data from database, for example: get 20000 records from database will spend 7 seconds, if I use odbc instead, it will just need about 30 ms. Does anyone have experience about this? Could you please give a suggestion for me? Best Regards! Eric 2012.10.29
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest