Hi,
To select all the rows(around 20000 rows) from table in the Oracle database, i use QSqlTableModel like this:
Qt Code:
  1. model.setTable(tableA);
  2. model.select();
  3.  
  4. while (model.canFetchMore())
  5. {
  6. model.fetchMore();
  7. }
  8.  
  9. int nRowCount = model.rowCount();
  10.  
  11. for(int i = 0; i<nRowCount; i++)
  12. {
  13. //handle each row
  14. //..
  15. //..
  16. }
To copy to clipboard, switch view to plain text mode 

But using canFetchMore() and fetchMore() in a while loop to get all the rows need too much time, so i refer to this article http://www.qtcentre.org/threads/1263...-speed-problem. Then i plan to start serval threads in MyModel(inherits RemoteTableModel as illustrated in article), each thread start to select part of table and add the part into MyModel, but i am not sure how to do it in details, could i use QSqlTableModel to select in each thread?
Could you give me some tips or any better way?
Thanks!