db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Holster (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-5151) Sequence without cache
Date Fri, 25 Mar 2011 13:59:06 GMT

    [ https://issues.apache.org/jira/browse/DERBY-5151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13011199#comment-13011199
] 

Mark Holster commented on DERBY-5151:
-------------------------------------

Hi Rick,

I am aware a sequence is "non transactional". That's fine for my usecase.

Although I'm fine with creating a patch which controls the cache by properties, derby will
be different on this than most other databases:
- DB2 uses a "cache | no cache" statement in sql
- Oracle uses a "cache <size> | nocache" statement in sql
- postgresql uses a "cache <size>" statement in sql
- hsqldb doesn't seem to use a cache

while reading the docs of other db's I must say I find the "cache <size> | no cache"
option the most elegant.

Should I (try to) provide a patch for the property base solution, or have I convinced you
to accept a solution like other db's?

Mark

> Sequence without cache
> ----------------------
>
>                 Key: DERBY-5151
>                 URL: https://issues.apache.org/jira/browse/DERBY-5151
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>            Reporter: Mark Holster
>         Attachments: sequence-no-cache.patch
>
>
> Currently, a sequence in Derby always uses a pre allocating cache. I'm working on an
usecase which requires a number to increase with a fixed value. The usecase fails after a
restart because of the pre allocating cache.
> I've created a patch that adds the options CACHE | NO CACHE to the create sequence statement.
When no cache is provided, the pre allocating cache size will be set to 1, which results in
a "no cache sequence".
> I've followed the CYCLE | NO CYCLE code as much as possible. Tested it in my own app
and it seems to work fine.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message