Yeah the bad news is this back-and-forth translation is a significant bit of overhead, but, there are ways to mitigate it.
I encountered this very situation on a consulting project last summer. If your IDs are strings in the database table, then you must query for them as strings. You can write the SQL to transform all the strings in the table to longs via some function and compare that way -- it works -- but is incredibly slow as it can't use the indexes. The solution is to translate from long back to String before querying. That's the purpose behind getLongColumn() and setLongParameter() in AbstractJDBCDataModel. You use these hooks to actually convert to/from Strings when interacting with a query or result set. Then it works fine. Sean On Wed, Jan 27, 2010 at 10:38 PM, ypai <[email protected]> wrote: > Any hints you could give to improve performance, or further enhancements to > existing classes that could improve performance, would be much appreciated.
