Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
4Activity
0 of .
Results for:
No results containing your search query
P. 1
Oracle DB Articles

Oracle DB Articles

Ratings: (0)|Views: 141|Likes:
Published by Pradeep_Singh_6036

More info:

Published by: Pradeep_Singh_6036 on Apr 12, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

09/13/2010

pdf

text

original

 
Much over looked thing while building UAT and DEV databases is it does not modelProduction database. I'v seen people tend to ignoring unless they are pushed hard tokeep UAT and DEV databases as much as close to Production database design, Datadistribution and Hawrdware/Software environment.for e.g. There was an Java Application running on Tomcat - Apache on Solaris 10 on on 64bit SPARC machines.1. UAT database was refreshed from export dump instead from Physical Hot/Cold/RMANbackup of Prod. Extent size on UAT and Prod was different. Prod had large fragmentationin some tables,indexes. While UAT did not have as it was refreshed from export dump2. Statistics were gathered in different way than Production.3. All database were placed on single Disk array on UAT database. Production has threemirrored copies of Redo logs while UAT has no mirrored redo log.4. Application was using Connection pooling implemented through java developed codein application only (instead using Oracle's default connection pooling or connectionpooling of Weblogic etc)5. UAT middle tier was using different JDBC driver than Production.6. Application was facing reaching open_cursors limit in UAR because connections frompool were not closed and some result sets were still opened. Increasing the number ofUAT solved it, but production did not have this issue as production servers had moreconnections in pool.
Interview questions on Oracle 10g RAC to hackle your mind for good.1. what is node eviction(gud to start with simple question)2. what is split brain3. who do your client connect to VIP or public IP? or is it your choice!4. how can you change VIP5. can private IP be changed.6. what does root.sh do when you install 10g RAC.7. how is virtual IP configured,what is done behind the VIP configuration assistant.--some simple questions8. what is client balancing and server side balancing.9. how does listener handles requests in RAC
 
10. Have you ever set TAF. If yes ,expalin how does fail over happens11. how can cache fusion improve or degreade performance.12. Have you ever faced any performance issue due RAC13. what is the background process for cache fusion. Does it have anything to do with logwriter process.14. will you increase parallelism if you have RAC, to gain inter instance parallelism.what are the considerations to decide.15. what is single point of failure in RAC16. how do you backup voting disk and how do you recover.17. what information is stored in OCR, what if you loose it. How can you recover it.18. how many voting disks and OCRs you can have. Why voting disks can be in oddnumbers only.19. A query running fast on one node is very slow on other node. All the nodes have sameconfigurations. What could be the reasons.20. Does RMAN behave differently in RAC21. Can archive logs be placed on ASM disk.what about on RAW.22. have you ever used OCFS, can you place OCR and voting disks on OCFS.
We can not assume in same way we don't believe in rule of thumbs!consider query:select c1, sum(c2)from t1group by c1this query returns result set in sorted order of c1 but it changes in 10g R2 as 10g used HASH GROUP BYOperation to implement grouping,rather than using SORT GROUP BY as it would do in earlier versions. SoHere if sorting is desired there must be explicit order by query.Similary There can be some join queries in which users might be getting sorted result set , but they can notrely on it always, may be if execution plan changes it can not sort the result set, so if sorting is required,developers need explicit specify order by clause in query.I remember a case in which a junior developer wrote a query to dump the table data to asciii csv file, Herewas obviously clear columns data in csv need in same order as in table. But as Developer came to know aboutview user_tab_columns I told him, he used query on this view to estimate the maximum record length oftable in csv file(rather than manully summing the all columns widths of table) what he could have donealternate way is set large linesize along with trimspool on, but he wamted to cut short work of typing select
 
c1||','|| c2||','||c3||','||... from table. So he generated this select query from user_tab_columns. But heassumed columns orders would be same as in table name. Result was wrong columns order in csv file. Soplease don't assume - it was view- so not guaranteed.
Rules of thumb are never advised by me but some can be taken as part of check list one by one whiletunning I/OI/O how much you have - mind it! so rule 1 is minimize I/O
rule 2: maximize cached I/Orule 3: minimize I/O contention.how to cut I/O:1. cut unnecessary fetch. Be restrictive about columns in selected list. Make sure all columns fetched inexplicit/implicit cursor are used some where in code.2. check usefullness of indexed columns. They may be slowing DMLs heavily and not yielding any queryperformance gain. So identify and drop such indexes.3. avoid triggers which performs lot of transactions and auditing from inside - these may actually beslowing DMLs especially when dmls in bulks are issued.4. check all tables/indexes have appropriate values ser for PCTFREE and PCTUSED . PCTFREE has default10% so you may be wasting not only 10% extra disk/cache memory but also causing more I/O forobjecting not undergoing future updates.5. If CPU resources are available some tables can be compressed. this will not ony minimize the I/O atthe expense of CPU but also meets the objective "maximize cache" - how ? Because table now needs lessbuffers, you have more free buffers where other objects can be assigned. This is very useful in casewhen there is no shortage of CPU but scarcity of memory is.6. If using materialized views for replication or reporting then, try their refresh possible by FASTmethod.7. Optimize query execution plan....

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->