• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Number to cache must be less than one cycle

 
Ranch Hand
Posts: 391
1
MySQL Database PHP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried to create a sequence with cycle , so that it start again from minvalue after reaching to maxvalue.


But when I tried it with specifying cache option also it works.

But it gives error Number to cache must be less than one cycle.

Whats the relation between cycle and cache .I think of these two options are completely separate.
Cycle is to specify what you want to do when you reach maxvalue of sequence and Cache is to specify how many numbers you want to cache in memory for some efficiency.
 
Sheriff
Posts: 3837
66
Netbeans IDE Oracle Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't get the error with the statement you've posted. I get it when I increase the cache size to 6, which is consistent with the error message.

I'd say that Oracle simply didn't bother implementing cache size larger than cycle size (you'd have to restart the sequence while filling up the cache, which might - just might - mean that the sequence needs to be updated in the data dictionary; remember that caching is a delicate stuff when concurrency needs to be handled). I believe it is an implementation detail, a decision which doesn't have some deeper meaning behind itself.
 
What kind of corn soldier are you? And don't say "kernel" - that's only for this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic