I have 3 static data tables with more than 100 thousand records. This tables should be refreshed only once a three months. The problem is in that getting this data at the first time from the database makes a significant performance delay in my application.
What technique I need to use to optimise getting that data in my app?
EDITED: Maybe it would be better to store it in XML for example (or others data structs) locally and refresh them periodically from db?
If you must retrieve the data from the database server, and you do that rarely, then the retrieval is bound to be somewhat slower than it could be, because the database server will not keep the table cached, because it’s rarely used. This is good, because it frees up cache space for other tables, which result in better overall performance.
It may be worthwhile to look into other storage mechanisms for your rarely-refreshed static data. Could you read it in from a local file? Could you keep a serialized structure on-disk and read it in? That may be faster than retrieving it from the database.