Fastest embedded SQL engine for Qt C++ application



  • I have used HSQLDB in java applications. It is extremely fast for a read only database. I am now re-developing that application in Qt C++. I am using sqlite at the moment. So far it has proven to be significantly slower than the HSQLDB implementation. What was sub-second response with HSQLDB takes several seconds to process using sqlite. I have done a lot of research on how to improve the efficiency of my sqlite database but with no significant improvement.

    Is there a better option for C++? I am using the Qt API for the SQL. Is there a better option? I really need to get this from 3-5 second response down to similar performance I had with HSQLDB.

    The table is a simple address table. The user is performing an address search. As they enter letters of the address a list of matches will appear in a QListWidget. As they enter additional letters it will replace the contents of the list with a new smaller list of matches. In the Java application as soon as they enter a new letter the response is almost immediate. In my C++ application I can enter 4 or 5 letters, slowly, before the results of the first letter is displayed.

    I tried creating an index on the street address field but it didn't help. I read that when you use the "LIKE" option sqlite does a direct table scan without using any indexes.

    Is there a better solution? Or is there a way to improve the performance of sqlite?


  • Moderators

    Hi,

    The best thing to do is to show us your implementation of your queries. It's hard to tell where your bottleneck is, otherwise.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.