Home » RDBMS Server » Performance Tuning » How to view the tables which are in the keep buffer cache????
How to view the tables which are in the keep buffer cache???? [message #525316] Sat, 01 October 2011 00:23 Go to next message
Narmada28
Messages: 13
Registered: September 2011
Junior Member
How to view the tables which are in the keep buffer cache???? please reply
Re: How to view the tables which are in the keep buffer cache???? [message #525318 is a reply to message #525316] Sat, 01 October 2011 01:07 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Do you mean which ones are defined to be in the keep buffer cache or which ones are currently in the keep buffer cache?

Answer depends on your Oracle version, so post it.

Regards
Michel
Re: How to view the tables which are in the keep buffer cache???? [message #525324 is a reply to message #525318] Sat, 01 October 2011 02:05 Go to previous messageGo to next message
Narmada28
Messages: 13
Registered: September 2011
Junior Member
i mean which ones are currently in the keep buffer cache?
Re: How to view the tables which are in the keep buffer cache???? [message #525332 is a reply to message #525324] Sat, 01 October 2011 02:55 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
Answer depends on your Oracle version, so post it.


Regards
Michel
Re: How to view the tables which are in the keep buffer cache???? [message #525341 is a reply to message #525332] Sat, 01 October 2011 04:17 Go to previous messageGo to next message
Narmada28
Messages: 13
Registered: September 2011
Junior Member
Oracle Database 10g Express Edition Release 10.2.0.1.0..it is my oracle version..
Re: How to view the tables which are in the keep buffer cache???? [message #525362 is a reply to message #525341] Sat, 01 October 2011 10:34 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>How to view the tables which are in the keep buffer cache????
It would be helpful if you followed Posting Guidelines - http://www.orafaq.com/forum/t/88153/0/311

http://www.lmgtfy.com/?q=Oracle+keep+buffer
Re: How to view the tables which are in the keep buffer cache???? [message #525363 is a reply to message #525341] Sat, 01 October 2011 10:42 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
The simplest way is:
select distinct t.owner, t.table_name
from v$bh bh, dba_objects o, dba_tables t, v$parameter p
where o.data_object_id = bh.objd
  and t.owner = o.owner
  and t.table_name = o.object_name
  and t.buffer_pool = 'KEEP'
  and p.name = 'buffer_pool_keep'
  and ( p.value is not null and p.value != '0' )
order by 1, 2
/

But it is useless as soon as the buffer cache is quite big and in a production environment as it is a performances killer.

Regards
Michel
Re: How to view the tables which are in the keep buffer cache???? [message #525371 is a reply to message #525324] Sat, 01 October 2011 11:28 Go to previous messageGo to next message
John Watson
Messages: 8929
Registered: January 2010
Location: Global Village
Senior Member
Hi - I was working on a slightly different query while Michel was replying. This is my version:
select distinct t.owner, t.table_name
from
v$bh b join dba_objects o on (o.data_object_id = b.objd)
join dba_tables t on (t.table_name = o.object_name and t.owner = o.owner)
where
t.buffer_pool = 'KEEP'
and b.status <> 'free'
order by 1, 2
/

The significant difference is that I'm checking whether the buffer is flagged as 'free'. I think that if it is 'free', then if you need to re-visit it, it must be read from disc again. I've been testing this with ALTER DATABASE FLUSH BUFFER_CACHE, which does not appear to clear the entry from v$bh. I'm open to correction on this.


Re: How to view the tables which are in the keep buffer cache???? [message #525374 is a reply to message #525371] Sat, 01 October 2011 12:03 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Yu're right I missed buffer status, I added the fact that keep buffer pool is configured otherwise the query returns false result (the table goes to the default buffer pool).
So a merge of both queries should be quite correct:

select distinct t.owner, t.table_name
from v$bh bh, dba_objects o, dba_tables t, v$parameter p
where o.data_object_id = bh.objd
  and t.owner = o.owner
  and t.table_name = o.object_name
  and t.buffer_pool = 'KEEP'
  and p.name = 'buffer_pool_keep'
  and ( p.value is not null and p.value != '0' )
  and bh.status != 'free'
order by 1, 2
/


Regards
Michel
Re: How to view the tables which are in the keep buffer cache???? [message #525445 is a reply to message #525363] Mon, 03 October 2011 02:54 Go to previous message
Narmada28
Messages: 13
Registered: September 2011
Junior Member
Thank u
Previous Topic: Views which will help in tuning SGA and PGA
Next Topic: don't know why this baseline doesn't work :/
Goto Forum:
  


Current Time: Fri Apr 19 12:43:20 CDT 2024