R
Rico
We have this JSP-based site whose code I've seen and I came across those
gems that would query a database and store all relevant results into
Vector's. But for each result in one given Vector the guy chose to make
one corresponding query to the db to get e.g the corresponding path.
The site feels horribly slow and I thought that the above was the cause
since it's so highly inefficient. So I set to task to store this table
from which we tap corresponding paths for each document in a Hashtable
first and then just loop through the document ID's to extract the matching
Hashtable values.
I was all excited about how much gain it would bring and pictured the
site to be a lot more slick... I was disappointed... I notice hardly any
difference :-(
Was that to be expected?
Could it be that what they tell us about how costly db connections are is
exaggerated? Or is the "optimization" I tried to make, thinking it's
actually the 'normal' way it should have been done, not much of an
optimization?
Rico.
gems that would query a database and store all relevant results into
Vector's. But for each result in one given Vector the guy chose to make
one corresponding query to the db to get e.g the corresponding path.
The site feels horribly slow and I thought that the above was the cause
since it's so highly inefficient. So I set to task to store this table
from which we tap corresponding paths for each document in a Hashtable
first and then just loop through the document ID's to extract the matching
Hashtable values.
I was all excited about how much gain it would bring and pictured the
site to be a lot more slick... I was disappointed... I notice hardly any
difference :-(
Was that to be expected?
Could it be that what they tell us about how costly db connections are is
exaggerated? Or is the "optimization" I tried to make, thinking it's
actually the 'normal' way it should have been done, not much of an
optimization?
Rico.