Hi,
To select all the rows(around 20000 rows) from table in the Oracle database, i use QSqlTableModel like this:
Qt Code:
QSqlTableModel model; model.setTable(tableA); model.select(); while (model.canFetchMore()) { model.fetchMore(); } int nRowCount = model.rowCount(); for(int i = 0; i<nRowCount; i++) { //handle each row //.. //.. }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!
Bookmarks