Results 1 to 6 of 6

Thread: Abort QSqlQuery::exec()

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2013
    Posts
    1
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: Abort QSqlQuery::exec()

    you can terminate the thread, but QSqlQuery .exec continue runing.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Abort QSqlQuery::exec()

    Does the database you are working with support paging?

    If yes you could probably execute your query in smaller pieces.

    Cheers,
    _

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Abort QSqlQuery::exec()

    Don't forget to thoroughly investigate why your single query is taking minutes, where that time is being spent, and redesign or adapt the query and database to perform better. Better joins, better indexes, temporary tables are all candidates you investigate.

Similar Threads

  1. Abort QDialog in the constructor
    By Tino in forum Qt Programming
    Replies: 2
    Last Post: 29th July 2009, 15:36
  2. Replies: 4
    Last Post: 14th May 2009, 00:43
  3. how to abort a function taking to long to process
    By john_god in forum General Programming
    Replies: 5
    Last Post: 30th April 2009, 01:06
  4. Replies: 2
    Last Post: 17th April 2009, 22:36
  5. Replies: 1
    Last Post: 9th September 2008, 00:10

Tags for this Thread

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.