Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask DBMS Expert


Home >> DBMS

Answer the following question in 200 words or less APA format.

Cite work

Performance tuning is an important activity to achieve top performance for an application. When testing a system, what initial steps would you complete to begin your performance tuning efforts?

Respond to the following question in 200 words or less APA format.

Cite work

The process of performance tuning is complex and it is not exactly possible to come up with one solution that suits all situations. We can encounter several different problems and we may need to use several different approaches to solve the issue and performance to tune the system. In addition, the right order recommended by Oracle for tuning includes:

- Database tuning
- Application tuning
- Memory tuning
- I/O tuning
- Eliminating database contention
- Tuning the OS

1. Before starting tuning a system, we have to choose what approach to go with. Some Oracle DBAs recommend a bottom-up approach which is finding the highest impact SQL statements and tuning them and examining system dumps to lower significant wait events. Other DBAs and Oracle university recommends top-down approach in which the system is tuned as whole using the existing workloads before tuning individual SQL statements.

2. Make sure that the Oracle database has been tuned properly. Oracle's RDBMS can be tuned to a great extent allowing for easy monitoring of the database and easy adjustments to help boost the performance of the database. Improper tuning of the database can create plenty of problems such as low response time, slow systems poor hardware usage and also loss of money. As a result, it is very important to keep your Oracle DB in top shape and tuned to handle all the work load using minimal resources.

Burleson, D. K. (2010). Oracle Tuning: The definitive reference. Kittrell, NC: Rampant Techpress.

Respond to the following question in 200 words or less APA format.

Cite work

The nice thing about Oracle is that there are many tasks that can be carried out to tune a database in order to achieve better performance. Generally, it's a good idea to tune a database when it starts interfering with the demands of day-to-day business. For instance, if a customer needs to wait too long for a screen to reload or to run a report, performance tuning may be necessary. According to Oracle FAQs (n.d.), the following are areas for potential tuning (also mentioned by Galtbolor):

Database design
Application tuning
Memory tuning
Disk I/O tuning
Eliminate database contention
Operating system tuning

Asktheoracle.net (n.d.) offers some good tips for tuning common problems.

If you're going to be passing large data values to subprograms, it might be good to allow the parameters to be passed by reference by using the NOCOPY hint.

Tune embedded SQL in PL/SQL code. Fewer SQL statements will increase the performance as every SQL statement requires a context switch.
Tune cursor handling. Similar to tuning SQL statements. If you can combine statements, this will increase performance.

Tune exception handling. Every time an exception is raised, Oracle has to handle that error and jump to the exception handler or propagate the error to the host environment. Good design will help avoid the raising of exceptions. Using the %TYPE and %ROWTYPE attributes, will minimize the odds of exceptions being raised.

Replace PL/SQL with SQL. Sometimes, PL/SQL is not the right tool for the job. For instance, one can use PL/SQL to loop through records to update them, but a single update statement may accomplish the same task.

Use BULK COLLECT

References

Asktheoracle.net. (n.d.).10 Oracle PLSQL performance tuning tips. Retrieved from http://www.asktheoracle.net/oracle-plsql-performance-tuning.html

Oracle FAQs.(n.d.).Oracle database performance tuning FAQ. Retrieved from

http://www.orafaq.com/wiki/Oracle_database_Performance_Tuning_FAQ

Answer the following question in 200 words or less APA format.

Cite work

Discuss the advantages and disadvantages of using dynamic SQL in you PL/SQL code?

Respond to the following question in 200 words or less APA format.

Cite work

The advantages of Dynamic SQL are:

• It provide elegant solutions to problems that would otherwise require a lot of static SQL code. Casteel provides the example of allowing the user user built queries interactively to return data from a table (2013, p.398-400).

• It also provides a means of allowing you to include DDL statements in PL/SQL code (Casteel, 2013, p.401).

There are a number of disadvantages to the use of Dynamic SQL :

• Some dynamic queries require complex coding, the use of special data structures, and more runtime processing. ("Oracle Dynamic SQL", 2000).

• It makes coding difficult unless you fully understand dynamic SQL concepts and methods. ("Oracle Dynamic SQL", 2000).

• It potentially adds processing time. ("Oracle Dynamic SQL", 2000).

• It cannot be checked at compile time (Webster, 2014).

• It does not allow dependency checking (Webster, 2014).

• It can result in security issues via SQL Injection if handled incorrectly (Gnanasundar, n.d.).

References

Casteel, J. (2013). Oracle 11g: PL/SQL Programming. Boston, MA: Course Technology.

Oracle Inc.(2000). Pro*C/C++ Precompiler Programmer's Guide Release 8.1.6.Oracle Dynamic SQL.Retrieved on the 15th of June from http://docs.oracle.com/cd/A87860_01/doc/appdev.817/a76942/pc_13dyn.htm#602

Webster, C (2014).CodeRanch.com. Benefits and Downfall of implementing dynamic sql statements. Retrieved on the 15th of June from http://www.coderanch.com/t/608248/Oracle-OAS/Benefits-Downfall-implementing-dynamic-sql

Respond to the following question in 200 words or less APA format.

Cite work

Advantages of dynamic SQL

• Reuse code for different tables or other objects.
• Reuse code for different databases.
• Use variable names in statements that require constants.
• Avoid statements that would be either impossible or very hard to code because of the high number of possibilities involved.
• Return rowsets with a variable number of columns and/or variable column names.
• Allow parameterized filtering with the IN clause.
• Sorting by any column from a table.

Disadvantages of dynamic SQL

• Performance loss: the execution plan for a dynamic query cannot be cached.
• Hard to debug.
• The error management becomes more unreliable. There is no easy way to validate the dynamic code or control its effects.
• Temporary tables from the main statement cannot be used, unless they are global.
• If the algorithm of the main statement has many loops, calculations or slow queries, that time will add up to the time of executing the dynamic code.
• Maintenance is difficult because the schema is hard coded in the dynamic code. The main statement is harder to understand than regular code because it is necessary to consider how it affects the dynamic code, without seeing it.

SQL Server dynamic tsql.(n.d.). Retrieved June 14, 2016, from

http://www.dba-sql-server.com/sql_server_tips/t_super_sql_460_dynamic_sql.htm

Respond to the following question in 200 words or less APA format.

Cite work

Advantages of Dynamic SQL

• More versatile than plain embedded SQL programs.
• Dynamic SQL statements can be built interactively with input from users having little or no knowledge of SQL.

Disadvantages to the use of Dynamic SQL

• Dynamic queries require complex coding
• Dynamic queries require use of special data structures, and more runtime processing.
• Coding may be difficult unless you fully understand dynamic SQL concepts and methods.
• Dynamic SQL cannot be checked at compile time
• Dynamic SQL does not allow dependency checking

References

Oracle Inc.(2000). Pro*C/C++ Precompiler Programmer's Guide Release 8.1.6.Oracle Dynamic SQL. Retrieved on the 15th of June from http://docs.oracle.com/cd/A87860_01/doc/appdev.817/a76942/pc_13dyn.htm#602

DBMS, Programming

  • Category:- DBMS
  • Reference No.:- M91836968
  • Price:- $40

Priced at Now at $40, Verified Solution

Have any Question?


Related Questions in DBMS

Suppose that we have a table of house prices and a table of

Suppose that we have a table of house prices and a table of zip codes: • hprices(hid (PK),address,bedrooms,price,zipcode) • zipcodes(zipcode (PK),state) Write a SQL query that finds the average, maximum, and minimum pric ...

Database design amp development assignment -assignment

Database Design & Development Assignment - Assignment title - Design and Implement a Relational Database for a local Print and Ink Refill Business. Learning Outcome - Use an appropriate design tool to design a relational ...

You are responsible for keeping track of meal expenses for

You are responsible for keeping track of meal expenses for ten employees while at a business lunch to which your employer has invited you to attend. Write an algorithm that inputs the lunch costs for each the ten employe ...

The relation memberstudentid organizationid roleid stores

The relation Member(StudentId, OrganizationId, RoleId) stores the membership information of student joining organization. For example, ('S1', 'O2', 'R3') indicates that student with Id 'S1' joined the organization with i ...

Stored procedure please create the following stored

Stored procedure. Please create the following stored routines using CPS3740_2017S database using the tables in dreamhome database. xxxx is your email id 1) Implement a stored procedure p3Q21_xxxx to display the Branch ci ...

Question create an erd for the following scenario once you

Question: Create an ERD for the following scenario. Once you submit you will get access to the correct way to create the ERD. Please watch the video and correct any errors in your submission and resubmit. A small company ...

Assignment question - write and run sql statements to

Assignment Question - Write and run SQL statements to complete the following tasks Part A - DML 1. Locate the record in the vendor table that does not have a value for the attribute V_STATE 2. Find the customers whose ba ...

Query 1 the bookstore has decided to keep track of the

Query 1: The bookstore has decided to keep track of the vendors' information. In order to do this, one new table will be added to the database. The schema for this table, as related to the existing tables, is the followi ...

Question create the physical data model for the logical

Question: Create the physical data model for the logical data model that you submitted in IP3. This should include all of the data definition language SQL. Your submission should include all DDL needed to: Create the tab ...

Question we can sort a given set of n numbers by first

Question : We can sort a given set of n numbers by first building a binary search tree containing these numbers (using TREE-INSERT repeatedly to insert the numbers one by one) and then printing the numbers by an inorder ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As