application will search in database almost all columns across about 8 tables/views for defined string and return all rows containing that string (will return collection of objects or JSON). At beginning database(DB2 v6) will contain about 100k records
Which approach is better:
- Loading these tables and mapping them to objects in application memory, searching using these objects.
- Mapping tables from database to embed database in application(JAVA DB in this case), searching using embed database.
First one is fast but downside is that application will need memory(first prototype went up to .5 GB), the second one is slower and also is heavy on memory.
Has anyone tried something similar or can point to better solution please share it.