Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QSqlTableModel slow fetch results
QtWS25 Last Chance

QSqlTableModel slow fetch results

Scheduled Pinned Locked Moved General and Desktop
3 Posts 1 Posters 1.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    whhfly2003
    wrote on last edited by
    #1

    I found that QSqlTableModel is very slow when there is network delay. I use ms sql server and I found that after QSqlTableModel select() method is executed. I get all the data(the dataset is very small only 100 lines) I want. But if I get the value by row I found that it keeps on fetch from database which make the software very slow. If anyone have suggestion for this. Thanks

    1 Reply Last reply
    0
    • W Offline
      W Offline
      whhfly2003
      wrote on last edited by
      #2

      By the way if I use QSqlQuery and setForwardOnly. it is very fast. How can I fix this because QSqlTableModel is very convenient to a QTableView

      1 Reply Last reply
      0
      • W Offline
        W Offline
        whhfly2003
        wrote on last edited by
        #3

        I also found that in sql server profiler. If you get data from the model there will be sp_cursorfectch in the log. Why?? I think maybe qsqltablemodel is just useful in locat db like qsqlite. Has any one use qsqltablemodel with sql server??

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved