Angsuman's Java Blog

News and views from my perspective as a Chief Software Architect and CEO. Focused on Java and Web Technologies.

Tuesday, February 11, 2003

Optmization tip when accessing two different databases

I just optimized a JSP page which displays live userlist and other relevant information by accessing two tables in two different databases. It was talking 168 seconds on my 600mhz machine. Now it takes 3 seconds! Trick was to HashMap info from one table with lesser info and through the bigger tables and slower access database. Previously I was'ing through the faster one and fetching details from the slower one.