![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| ||||||
| ||||||
|
|
I'm a wonderin... I have an application that will implement key business logic in PL/SQL, and uses various configuration values, as stored in various database tables, to control certain aspects of it's operations. Is there not some way to read these configuration values into some sort of persistent application wide memory cache? |
|
Like, if I were writing a C++, java, or C# application, I'd read the various configuration tables at startup, (or on first use), and populate a single application wide cache that would be used subsequently. Is there no corresponding mechanism with PL/SQL? |
| Packages provide each individual session with it's own copy of whatever package variables are defined, and that's a good thing, but it seems like there needs to be some other intra-session store that can be used on an application wide basis. No? |
| Do I have to re-read the tables each time? |
|
runs in the server, but it still seems wasteful. Can certain tables be "pinned" or something like that? |
|
I could use package variables, but this would duplicate the values for each user session. Worse, it would be very much more complicated to resyncronize these many caches in the event that the data is updated (rare - but can happen) Thanks for any thoughts and suggestions roger |
#3
| |||
| |||
|
|
You are on your way to reinvent the wheel and you will fail miserably. You seem to think I/O is bad, and that the buffer cache doesn't exist. |
#4
| |||
| |||
|
|
Sybrand Bakker <gooiditweg (AT) sybrandb (DOT) demon.nl> wrote in news:hh3hnvcltbqmtphvdgh4ft364k1uuim5b5 (AT) 4ax (DOT) com: You are on your way to reinvent the wheel and you will fail miserably. You seem to think I/O is bad, and that the buffer cache doesn't exist. Not at all. That's why I post the question before proceeding. Performance aside, the other reason one might wish to extract these table-resident values, rather than re-select them every time, they are needed, would be to provide a more convenient and robust API for using them. OOps, that must be my "crap 3gl" background showing through. Sorry, I'll have to try and remember to shut off that half of my brain when posting here in the future. Seems a pity. In addition to Sybrand's comments I would refer you to learning about |
#5
| |||
| |||
|
|
In addition to Sybrand's comments I would refer you to learning about Oracle's system triggers that can be used to execute code and pin it in memory on startup and Oracle's package initialization section that, used in conjunction with the triggers, can maintain persistent memory in variables during a session. |
#6
| |||
| |||
|
|
I'm a wonderin... I have an application that will implement key business logic in PL/SQL, and uses various configuration values, as stored in various database tables, to control certain aspects of it's operations. Is there not some way to read these configuration values into some sort of persistent application wide memory cache? Like, if I were writing a C++, java, or C# application, I'd read the various configuration tables at startup, (or on first use), and populate a single application wide cache that would be used subsequently. Is there no corresponding mechanism with PL/SQL? snip>? |
#7
| |||
| |||
|
|
Is there not some way to read these configuration values into some sort of persistent application wide memory cache? |
![]() |
| Thread Tools | |
| Display Modes | |
| |