[OS-JIRA] Created: (CAY-222) Change CREATE statement for HSQLDB when Generating SQL

From: jir..bjectstyle.org
Date: Fri Oct 29 2004 - 09:49:46 EDT

  • Next message: jir..bjectstyle.org: "[OS-JIRA] Created: (CAY-223) Ability to reference other models"

    Message:

      A new issue has been created in JIRA.

    ---------------------------------------------------------------------
    View the issue:

      http://objectstyle.org/jira/secure/ViewIssue.jspa?key=CAY-222

    Here is an overview of the issue:
    ---------------------------------------------------------------------
            Key: CAY-222
        Summary: Change CREATE statement for HSQLDB when Generating SQL
           Type: Improvement

         Status: Assigned
       Priority: Minor

        Project: Cayenne
     Components:
                 CayenneModeler GUI

       Assignee: Andrus Adamchik
       Reporter: Michael Gentry

        Created: Fri, 29 Oct 2004 9:49 AM
        Updated: Fri, 29 Oct 2004 9:49 AM
    Environment: All environments.

    Description:
    When generating SQL for HSQLDB in the Modeler, table creation is specified as:

    CREATE TABLE ...

    when it should most likely be:

    CREATE CACHED TABLE ...

    In HSQLDB, the default version is a "memory" table, which means all data for the table is in memory (even if it is writing through to the disk as INSERT statements). The "cached" table only keeps a portion of the table/indexes in memory, which allows for much larger tables (yes, the terminology is confusing since it seems that the cached table would be kept in memory).

    To quote the documentation:

    Memory tables are the default type when the CREATE TABLE command is used. Their data is held entirely in memory but any change to their structure or contents is written to the <dbname>.script file. The script file is read the next time the database is opened, and the MEMORY tables are recreated with all their contents. So unlike TEMP table, the default, MEMORY tables are persistent.

    CACHED tables are created with the CREATE CACHED TABLE command. Only part of their data or indexes is held in memory, allowing large tables that would otherwise take up to several hundred megabytes of memory. Another advantage of cached tables is that the database engine takes less time to start up when a cached table is used for large amounts of data. The disadvantage of cached tables is a reduction in speed. Do not use cached tables if your data set is relatively small. In an application with some small tables and some large ones, it is better to use the default, MEMORY mode for the small tables.

    ---------------------------------------------------------------------
    JIRA INFORMATION:
    This message is automatically generated by JIRA.

    If you think it was sent incorrectly contact one of the administrators:
       http://objectstyle.org/jira/secure/Administrators.jspa

    If you want more information on JIRA, or have a bug to report see:
       http://www.atlassian.com/software/jira



    This archive was generated by hypermail 2.0.0 : Fri Oct 29 2004 - 09:49:49 EDT