|
|
|
|
Re: whats syntax to keep table in memory? [message #362842 is a reply to message #362829] |
Thu, 04 December 2008 04:55 |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
Because Oracle is smarter than that.
Oracle will cache blocks of data that it reads from tables in a list. Blocks are removed from the least recently used end of this list as new blocks are added.
So, if you have a process that scans through all the blocks in a table, and reads data rom each block multiple times, then the first time a block is accessed, it will be read from disk, but in subsequent reads, it will be found in the memory cache.
The instinctive response to this is 'Ah - my database is quicker than that - it's already got the table in memory and doesn't have to read it in'
There are 3 responses to this:
1) You are ignoring the time it took you to read the table into memory in the first place.
2) You are ignoring the effects on the whole system of having your cached tables occupying memory all the time, even when they're not being used
3) It is possible to define a seperate buffer pool so that you can avoid having the blocks from your reference tables flushed out of the cache if a large batch process runs.
|
|
|
|
|
|