During a previous project using Perl and MySQL, I was able to significantly increase performance by fetching n rows with n/x queries of the type:
SELECT * FROM table WHERE id IN (id1,id2,id3,...,idx)
instead of n queries of the type
SELECT * FROM table WHERE id=id1
Every time Hibernate materializes a collection and I see the long series of identical queries printed in the query log, I wonder if there would be any performance gains by condensing the select queries in this way. You guys probably know more about whether this performance gain would be particular to Perl or MySQL, but I'm curious what you think of the idea.
|