Qtsql qoci select query performance



  • I've got a question performance of Qtsql module, exactly QOCI interface. Simple application which only connect and selects data, works way too slow (about 5 times) in comparison with other tools (sqldeveloper e.g). Low performance occurs on small, and big db tables.

    Pseudo code looks as follows:
    @QSqlDatabase db = QSqlDatabase::addDatabase("QOCI", "DB1");
    db.setUserName("aaa");
    db.setPassword("bbb");
    db.setDatabaseName("aaa");
    db.open();
    QSqlQuery query(db);
    query.setForwardOnly(true);
    query.prepare("select x from y where rownum < 20");
    query.setForwardOnly(true);
    db.transaction();
    query.exec();

    while (query.next()) {
    qDebug() << query.value(0).toString();
    }@

    Any suggestions how to make it faster? ps. i'm using qt 4.8.4 and ora client 11.2


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.