Results 1 to 2 of 2

Thread: QSqlTableModel select() / submitAll() very slow

Threaded View

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

    Default Re: QSqlTableModel select() / submitAll() very slow

    You have to transfer only those rows that you need and those that have changed. I don't think you need to view all 3M rows at once, so teaching your model to use canFetchMore() and fetchMore() can give a rather significant improvement. The same goes with submiting changes to the remote model. Relying on QSqlTableModel that uses a generic SQL driver is not a good idea as different SQL drivers have different capabilities and can take a rather inefficient code path.
    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. The following user says thank you to wysota for this useful post:

    mihaibu (4th August 2013)

Similar Threads

  1. submitALL, QSqlTableModel and QTableView
    By scott_hollen in forum Qt Programming
    Replies: 3
    Last Post: 9th October 2011, 09:38
  2. Replies: 0
    Last Post: 8th July 2011, 12:28
  3. QSqlTableModel::select()
    By vladozar in forum Qt Programming
    Replies: 4
    Last Post: 29th April 2009, 17:51
  4. QSqlTableModel->submitAll()
    By maxel in forum Qt Programming
    Replies: 1
    Last Post: 6th September 2008, 08:30
  5. QSqlTableModel submitAll access query
    By patrik08 in forum Qt Programming
    Replies: 4
    Last Post: 27th April 2007, 08:04

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.