db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel John Debrunner (JIRA)" <derby-...@db.apache.org>
Subject [jira] Created: (DERBY-909) Improve performance of String literals in statements
Date Wed, 01 Feb 2006 18:40:24 GMT
Improve performance of String literals in statements

         Key: DERBY-909
         URL: http://issues.apache.org/jira/browse/DERBY-909
     Project: Derby
        Type: Improvement
  Components: Newcomer, SQL  
    Reporter: Daniel John Debrunner
    Priority: Minor

String literals (constants) go through this process currently

Create String object from within parser
Serialized String into generated class file as UTF-8 (taking up two constant pool entries)
Unserialize and intern String from generated class at class load time

The serialize into the class file and un-serialize can be avoided by saving  the String in
the saved object pool (see CompilerContext)

This would benefit the common pattern we see in SQL scripts that load data like:

insert into customer values (1, 'Fred', 'Flintstone');
insert into customer values (2, 'Wilma'', 'Flintstone');

Note these are poor performing in Derby compared to other databases.

It would also be a step on the way to having a single compiled plan for such statements that
don't use parameter markers.

Most likely the performance benefit with inserts will be small until DERBY-888 is fixed, because
with inserts the sync of the allocated pages dominates the cost.

Possible newcomer task with guideance.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message