Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

Topic: Database Administration >> niec question.. pls help me find an answer

Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property. You may review the entire Oracle Certification Program Candidate Agreement online Here.



  


 Title: niec question.. pls help me find an answer
 sudheer pai  Posted: Jul 14, 2007 06:14:05 AM

 Total Post: 33
 Joined: Feb, 2007






 Hi,

if i(scott) give the select * from employees for the first time, the
related blocks come to the DBBC and the next time they are used from them.
but if my query becomes select * from employees where department_id=50;
then will i use the same data that was for the first time fetched in my
Buffer.
if so, what about if some hr user(having priviliges) is typing select *
from hr.employees; then will he again use the same data from the Buffer.
or is the execution plan after parsing is totally different even for the
slightest of the text change in my SQL query.


 Ahmed
Posted: Jul 16, 2007 07:47:41 AM  

 Total Post: 13
 Joined: Mar, 2006






 
MAY THE EXECUTION PLAN BE DIFFERENT AS MAY ONE OF THE SELECT STATEMENTS USE AN INDEX SCAN AND THE OTHER MAY USE A FULL TABLE SCAN

 KS
Posted: Jul 16, 2007 08:44:40 AM  

 Total Post: 60
 Joined: Nov, 2006






 
Yes, Even for a single change in the SQL query ,it will go for Parsing and prepare a execution plan.

- Sri

 sudheer pai
Posted: Jul 16, 2007 09:18:01 AM  

 Total Post: 33
 Joined: Feb, 2007






 
sri that is clear that the plan wud change..
but tell me if the buffer wud be read???
will the 2nd statement use the data in the buffer of will the data be pull again to the buffer???

 KS
Posted: Jul 16, 2007 11:24:26 AM  

 Total Post: 60
 Joined: Nov, 2006






 
Yes,it will be using the DBBC.
It will look for the Latest SCN and it will fetch it from the DBCC (if present already)

 dipali
Posted: Jul 20, 2007 07:47:55 AM  

 Total Post: 31
 Joined: Dec, 2006






 
i think,
when scott fires
select * from emp;
at that time, the emp table of scott schema gets loaded in buffer cache..

while when hr fires
select * from hr.emp;
(as asked in question)
at that time, the emp table of hr schema gets loaded..

Both are completely different objects (though having the same name..)
So there is no question.. Both will be loaded differently and occupy different space in database buffer cache...

 positive
Posted: Jun 29, 2008 08:49:43 PM  

 Total Post: 361
 Joined: Jun, 2008






 
sql execution allocates a portion of memory in PGA for user specific operations.

For details refer:

http://neworacledba.blogspot.com/

 Time Zone: EDT

  




Forum Rules & Description


Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user




 








Get FREE Magazines

Top 10 Forum User

  Murtuja Khokhar814
  Mohammed Taj694
  Jayanta Sur479
  Vigyan Kaushik386
  positive fanatic361
  Gitesh Trivedi322
  Gopu Gopi239
  neeraj sharma228
  Ramesh Jois226
  snehalatha p169






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software