db-derby-dev mailing list archives

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

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

Bryan Pendleton commented on DERBY-5151:

It's interesting that you've located 4 other databases,with 4 different syntaxes for this

That's exactly why the Derby project generally strives to implement only SQL syntax that has
been standardized.

Otherwise, which of those other database system do you pick as your model?

You picked Oracle, while other people might prefer that Derby was DB2-compatible,
or Postgres-compatible, or SQLServer-compatible, or...

Actually, if I am reading your comment *very* closely, you picked a variation that doesn't
match any of the other 4 databases you identified, since DB2 has a space in 'no cache'
but doesn't allow a <size>, whereas Oracle allows <size> but doesn't have a space
in nocache.

An internal Derby database property is unfortunately yet another tunable "knob", which
we also try to avoid since we are trying to make Derby as close to a zero-administration
database as we can, but at least we don't create yet another variant of non-standard SQL.

> 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

View raw message