Farakh khan wrote:Hi,
There is no error and printStackTrace()+finally block are in the main method
I need help to refine my SQL query or method to optimize the insert time period. In DB there is 100K+ records and are taking minutes to be searched and then insert. Looking for any suggestion as to how can I change the strategy to have best possible results.
Please note: the code is working fine
Martin Vajsar wrote:Yet another consideration: generic LIKE (the one with '%' at the beginning) cannot be answered using standard indexes and the database has to scan the whole table to find matching records. Depending on the database, there might be specific indexing methods that allow to efficiently do a text search, but even so, it might not apply to the LIKE clause - a specific function might be required to be used.