[Qt-interest] qsqlquery anyone with any experience at all?

Roland Tollenaar rwatollenaar at gmail.com
Wed Sep 1 09:17:42 CEST 2010


Hi Scott,

exec and the (empty) while(query.next()) loop takes < 2 seconds to execute.

adding only this line:

query.value(0);

in the while(query.next()) loop takes the time up to 40 seconds.

This is on my local  database, to the serverr over the network takes a 
bit longer.

There are about 15000 records.

Datatype is varchar, text and datetime. No BLOBS.

any ideas?

Kind regards,

Roland



On 01-09-2010 8:52 AM, Scott Aron Bloom wrote:
> Message received...
>
> Some pointers, the Qt overhead, is really quite minimal..
>
> First, does your SQL backend, have a "preferred client" how quickly does
> it send back large record sets...
>
> What data is being sent back?? Large BLOBs get read into QByteArrays,
> meaning they take up ram... is it possible your just dealing with a ton
> of data..
>
> For me, I tend to find the majority of the delay in the exec, not in the
> query.next()...
>
> Scott
>
> -----Original Message-----
> From: qt-interest-bounces at trolltech.com
> [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Roland Tollenaar
> Sent: Tuesday, August 31, 2010 11:27 PM
> To: Qt-interest
> Subject: [Qt-interest] qsqlquery anyone with any experience at all?
>
> Hi,
>
> I posted below but am not sure whether my posts are arriving on the
> list.
>
> Is there anyone who has _any_ experience with qsqlquery at all?
>
> Regards,
>
> Roland
>
> Hi,
>
> we have found that using query.next() in combination with qodbc is very
> very slow in qt 4.5.2.
>
> Is there a faster manner to process large recordsets or has the
> qsqlquery (or qodbc) class been improved dramatically in 4.6 that anyone
>
> knows of?
>
> thanks in advance for any advice,
>
> Roland
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>



More information about the Qt-interest-old mailing list