#21 some performance updates

open-later
Fred Toussi
None
5
2004-05-08
2004-05-04
Anonymous
No

TransferDb.putData(String statement, TransferResultSet
r, int iMaxRows)

That is quite slow. Mainly because in
TransferDb.transferRow there is a temp variable sLast
that gets costly values assigned but is never used.
The other reason is that no proper blockwise read added.

Another point is that r.getColumnType is used quite
often in
transferRow. I reduced this to one time per table that
gave 10% speed enhancement.

I did a sublass of ScriptReaderBinary that also writes
out indizes. When a RAM database is read again then
this speeds about about 25%.
HsqlProperties tmpProperties =
DatabaseManager.parseURL(URL, false);
Database tmpDB =
DatabaseManager.getDatabase(DatabaseManager.S_MEM,
".", true, tmpProperties);
RamdbReader scr = new RamdbReader(tmpDB, FILENAME, true);
scr.setTracer(Singleton.theCacheLogger());
scr.readAll(tmpDB.getSessionManager().getSysSession());
scr.close();

The zipped versions of the reader and writers are
superfluous because they add only a simply property
(zipped stream). This is better done in a superclass in
order to allow easy subclassing.

I added a transfer class SimpleTableTransfer that
extracts all tables from a set from another database
into hypersonic. It only creates foreignkey constraints
that point to table of the transfered set.

Regards,
Stephan

stephan dot frind at t-online dot de

Discussion

  •  
    Attachments
  • Logged In: NO

    There was a bug in my indizes read. (I guess you will use
    some different algorithm but anyway):
    RamdbReader.readIndex(...) {
    ...
    } else if (tmpLastOperation ==
    TreeNavigationConstants.UP) {
    while (!tmpCurrentNode.isFromLeft()) {
    tmpCurrentNode =
    tmpCurrentNode.getParent();
    }
    if (tmpCurrentNode.getParent() != null) {
    tmpCurrentNode =
    tmpCurrentNode.getParent();
    }
    if (tmpNode != null) {
    tmpCurrentNode.setRight(tmpNode);
    tmpNode.setParent(tmpCurrentNode);
    // <- this was missing
    tmpCurrentNode = tmpNode;
    }
    }
    ...

     
  • Fred Toussi
    Fred Toussi
    2004-05-08

    • assigned_to: nobody --> fredt
    • status: open --> open-later
     
  • Fred Toussi
    Fred Toussi
    2004-05-08

    Logged In: YES
    user_id=150940

    Transfer Tool speedup updates have been committed to CVS.

    Please send the new files, which are not included in the .diff
    file.