Rainer, what do you think about this one? Cheers, F
On 29 September 2014 08:16, ivan nemeth <[email protected]> wrote: > Hi Francis, > > ok, here it is: > > https://issues.apache.org/jira/browse/EMPIREDB-213 > > Regards, > Ivan > > > On Sun, Sep 28, 2014 at 8:57 PM, Francis De Brabandere <[email protected]> > wrote: >> >> Hi Ivan, >> >> Would you mind creating at ticket for this issue? >> https://issues.apache.org/jira/browse/EMPIREDB >> >> Thanks, >> Francis >> >> On 24 September 2014 16:14, Ivan Nemeth <[email protected]> wrote: >> > Hi, >> > >> > the DBReader can be much faster for resultsets with many columns if the >> > getFieldIndex(ColumnExpr c) method uses some kind of caching. The >> > following >> > code is 10 times faster for a resultset with 20000 rows and 70 columns. >> > >> > public class MyDBReader extends DBReader { >> > >> > private static final long serialVersionUID = 1L; >> > private Map<ColumnExpr, Integer> fieldIndices = new HashMap<ColumnExpr, >> > Integer>(); >> > >> > @Override >> > public int getFieldIndex(ColumnExpr column) { >> > Integer i = fieldIndices.get(column); >> > if (i == null){ >> > i = super.getFieldIndex(column); >> > fieldIndices.put(column, i); >> > } >> > return i; >> > } >> > >> > } >> > >> > What do you think? >> > >> > Regards, >> > Ivan > >
