Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 22732 invoked from network); 25 Mar 2011 16:40:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Mar 2011 16:40:43 -0000 Received: (qmail 20271 invoked by uid 500); 25 Mar 2011 16:40:43 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 20251 invoked by uid 500); 25 Mar 2011 16:40:43 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 20243 invoked by uid 99); 25 Mar 2011 16:40:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Mar 2011 16:40:43 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Mar 2011 16:40:42 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id F27B74DF99 for ; Fri, 25 Mar 2011 16:40:05 +0000 (UTC) Date: Fri, 25 Mar 2011 16:40:05 +0000 (UTC) From: "Rick Hillegas (JIRA)" To: derby-dev@db.apache.org Message-ID: <76622605.11567.1301071205989.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <777536248.9593.1301001725734.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (DERBY-5151) Sequence without cache MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-5151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13011272#comment-13011272 ] Rick Hillegas commented on DERBY-5151: -------------------------------------- Aha. My dyslexic eyes now see Bryan's point that Oracle and DB2 differ in the treatment of the syntactic sugar: DB2 puts a space between the NO and the CACHE. For me, that argues for not supporting the syntactic sugar and just going with the Postgres syntax. What else am I missing? Thanks. > 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