• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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.
 
Without deviation from the norm, progress is not possible - Zappa. Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic