We are using the QT3 Framework with the ODBC Driver to get access to a MS SQL Server and we really liked the simple high-lvl-API at the start, but now we experience a really bad performance.
The DB Server runs on a remote machine and we access it via the internet. A simple SQL query, which returns 1800 table rows takes us around 90 seconds, which is really dissatisfying.
The same query on a local copy of the database (MS Access DB) takes us around 1 second. Our guess is that this real big difference between this two measurements is because of the overhead of data packages and number of requests (one for each row) used to communicate with the remote server.
Our general understatement of the QSqlSelectCursor or QSqlQuery is the following:
1. initializing the query/cursor with the predefined query-statement
2. iterating the query/cursor with next() to get the single rows for further use
3. repeating step 2 until the end of the query/cursor
Does anyone know how QT manages the query results and does QT always send a new fetch request, every time we use next()? Or is there some way to get a local copy of the result (caching) we can work with to we skip the overhead?
Has anybody experienced similar problems using QT3 or got a solution for this performance problem?
Thanks in advance!
Bookmarks