In our setting, we have a small number of tables (10) with few thousand rows in each table. Our application runs a lot of small queries on these tables, mostly with less than 10 result rows; many queries even have empty results.
This takes quite some time (several minutes, including the application overhead of processing the data).
Simply dumping the entire contents of all tables into a text file takes just 2-3 seconds.
The application logic for processing similar data from an XML file also takes roughly 10 seconds.
So I think that this high number of queries may be the bottleneck (apart from the application logic to process the query results). Is it possible to prefetch the entire contents of these tables so that the actual queries do not need to access the mdb database file each time? Would that speed up the overall performance?
Best regards
Patrick
|
>Is it possible to prefetch the entire contents of these tables so that the actual queries do not need to access the mdb database file each time?
> Would that speed up the overall performance?
It's possible. But the key is to use index. If you haven't index for your column in where clause, you can use a bigger delayedClose connection property. For instance, delayedClose=120 . A bigger maxCacheSize connection property. Then if your query is use PreparedStatement, for instance, select ... from atable where acolumn=? , it will use temporary index automatically.
|