Results 1 to 10 of 10

Thread: Slow ODBC driver or programming error?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Slow ODBC driver or programming error?

    Quote Originally Posted by TorAn View Post
    I am fetching all results from the database.
    That's exactly why. You are fetching a lot of data which blocks your app.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. #2
    Join Date
    Nov 2009
    Location
    US, Midwest
    Posts
    215
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    62
    Thanked 4 Times in 4 Posts

    Default Re: Slow ODBC driver or programming error?

    1017 records is a lot of data?

    When this call is executed on the machine where db is located it takes about 2 secs.
    When it is executed on the LAN it takes about 4 seconds. When I am on WAN (public), it takes literally 5 minutes. The same sql request through SQL Management studio takes 2 secs on LAN and 2-4 secs on WAN.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Slow ODBC driver or programming error?

    Blame your ODBC driver. Qt driver is optimized for what it does, if you want to force it to load all the rows even if it doesn't want to, you probably get additional queries which slow down everything. Use a better driver or skip the unnecessary while loop.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #4
    Join Date
    Nov 2009
    Location
    US, Midwest
    Posts
    215
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    62
    Thanked 4 Times in 4 Posts

    Default Re: Slow ODBC driver or programming error?

    Blame your ODBC driver
    That's what I am doing.

    Which driver do you recommend? FreeTDS?

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Slow ODBC driver or programming error?

    Use the driver most fit for your database. However I would first think whether I really needed this while loop. It seems not necessary.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. ODBC function sequence error
    By joseph in forum Qt Programming
    Replies: 9
    Last Post: 7th November 2014, 13:32
  2. source code for odbc driver or MySql driver in arm-embedded-linux
    By sattu in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 24th January 2011, 11:11
  3. Model/View Programming - User Error Management
    By Zuzzu in forum Qt Programming
    Replies: 0
    Last Post: 4th March 2009, 17:39
  4. Error Loading MySql Driver in 4.3.4
    By perrigo in forum Qt Programming
    Replies: 5
    Last Post: 26th March 2008, 15:38
  5. Deploying debug Qt application - failed to load ODBC driver
    By sureshbabu in forum Installation and Deployment
    Replies: 1
    Last Post: 1st November 2007, 13:35

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.