Question

In: Computer Science

1. Explain how the physical design of a database influences performance tuning. 2.Explain three ways queries...

1. Explain how the physical design of a database influences performance tuning.

2.Explain three ways queries can be altered to increase database performance.

3. Present specific examples to illustrate how implementing each query alteration could optimize the database.

Solutions

Expert Solution

solution;

Question 1: Explain how the physical design of a database influences performance tuning.

Answer: In Physical Design we select a physical schema, which is a collection of data structures for implementing the conceptual schema.

In Tuning we periodically adjust the conceptual schema and/or physical schema of a system in order to adapt to the changing requirements.

Good physical design impacts the tuning by altering the database workload. Changes made to physical/conceptual schemas can impact all the updates and queries in the workload. Sometimes it is desirable to target some specific queries and applications.

Changes in physical design of the database can help in :-

a. Making the application run faster

b. Reducing the response time of transactions and queries

c. In improving the overall throughput of the transactions.

Question 2 and Question 3

1. Properly creating Indexes

By performing indexing carefully, we have easily make our SQL queries perform better. Indexes allow us to have quicker access to the database in complex situations. Users often ignore indexes or try to index everything. Both of these approaches are not right. Our queries will process slow without the indexes and with everything indexed, our updates and triggers will be ineffective.

2. Retrieve only the required data

We retrieve almost all the tuples or rows and columns using *, even though there is no requirement of all the rows or columns.

If our table is of small size, then writing a query to retrieve all the columns or rows will be of not use. But for large data sets, retrieving only required tuples, columns or rows will help in saving a lot of computational expenses.

For e.g. Writing a query like this (Below), will add to computational costs;

Instead we can retrieve selective columns, such as;

We can also make use of "LIMIT" clause for selective retrieval.

3. To avoid functions in Left hand side of the Operator

Although functions provide a quicker solution to handle complex tasks and can be easily used in "SELECT" clause and "WHERE" clause. But usage of functions in "WHERE" clause can cause serious computational issues. Check the example given below

;

Although there is usage of Index on the appointment date column of the table, the query will not be able to perform a full table scan because of the application of the DATEDIFF function. If the output of the applied function is evaluated at run time, the server visits all the rows of the table for retrieving the required data. But if we make changes in our code (Below), we can achieve great results.

SELECT nickname FROM users WHERE appointment_date > '2015-04-30';

Here we have not applied any function in where clause, hence the system can fully utilize the index to seek the data in an efficient way


Related Solutions

What is database tuning? Explain some of the tuning methods used by DBAs to improve performance....
What is database tuning? Explain some of the tuning methods used by DBAs to improve performance. What types of things affect performance of a database? Explain how those things are identified and managed. Explain database statistics and why they are important. How do you obtain database statistics?
Write a post in which you explain at least three ways that database design and data...
Write a post in which you explain at least three ways that database design and data architecture can work together to improve patient satisfaction, lower care costs, or improve patient outcomes. Then identify at least two areas of uncertainty or unanswered questions that you have about database design and data architecture.
1. How do tuning forks produce sound waves? Explain. 2. What physical aspect of the fork...
1. How do tuning forks produce sound waves? Explain. 2. What physical aspect of the fork determines the wavelength? 3. Where are the nodes on a tuning forks? 4. Why does the sound produced depend heavily on the orientation of the fork? This is referred to as 'Directionally Dependent.' 5. How should you orientate the fork in order to best hear the sound it produces?
1.write about your plan for the database performance tuning, query optimization, and distributed database management systems.  Include...
1.write about your plan for the database performance tuning, query optimization, and distributed database management systems.  Include appropriate diagrams.
True or False: Logical database design is the process of modifying the physical database design to...
True or False: Logical database design is the process of modifying the physical database design to improve performance. The two major logical database design techniques are conversion of E-R diagrams to relational tables and data normalization. Multivalued attributes are not permitted in unnormalized data. A many-to-many binary relationship in an E-R diagram requires the creation of a total of three tables in a relational database. A one-to-one unary relationship in an E-R diagram requires the creation of a total of...
Database Design CIW State_Capitals Physical Database Create primary and secondary keys for the attached unfinished physical...
Database Design CIW State_Capitals Physical Database Create primary and secondary keys for the attached unfinished physical database design. CREATE DATABASE STATE_CAPITALS; GO USE STATE_CAPITALS; GO CREATE TABLE Country( Country_Code varchar(10) NOT NULL, Country_Name varchar(50) NOT NULL, Population int NOT NULL, Country_Size float NOT NULL ) GO CREATE TABLE Region( Country_Code varchar(10) NOT NULL, Region_Code varchar(10) NOT NULL, Region_Name varchar(50) NOT NULL ) GO CREATE TABLE State( Region_Code varchar(10) NOT NULL, State_Code char(2) NOT NULL, State_Name varchar(50) NOT NULL, Date_of_Statehood int...
1) Explain how using a solid electrolyte effects cathode performance and design 2) Select 3 of...
1) Explain how using a solid electrolyte effects cathode performance and design 2) Select 3 of the 7 properties that are desired for a solid electrolyte. Define the properties and explain why they are desired for a solid electrolyte
Please use the books database pasted under question 4 to design the following SQL queries. Use...
Please use the books database pasted under question 4 to design the following SQL queries. Use any method such as subqueries, equi-join/inner-join, outer join, EXISTS 1. Find the name(s) of the publisher(s) who have published the computer book. 2. Find the name(s) of the author(s) that have authored more than one books. 3. Find the name(s) of the publisher(s) who published the least expensive book. 4. Find the name(s) of the author(s) who wrote the book with the greatest number...
Please use the books database pasted under question 4 to design the following SQL queries. Use...
Please use the books database pasted under question 4 to design the following SQL queries. Use any method such as subqueries, equi-join/inner-join, outer join, EXISTS 1. List the title_name and book type of the books that are published earlier than the earliest biography book 2. List the title_name and book type of the books published by 'Abatis Publishers' 3. Find the name(s) of the publisher(s) that have not published any book 4. Find the name(s) of the publisher(s) who have...
Need answers for Normalization, Physical Design, Sql, And Security exam. 1. The database you're creating will...
Need answers for Normalization, Physical Design, Sql, And Security exam. 1. The database you're creating will be installed on a group of three servers. What feature of an enterprise RDBMS will allow one server to pick up the processing work if the main server becomes nonoperational? A. Failover B. Business intelligence C. Data warehouse D. Load balancing 2. What type of clause must you always use with DELETE or UPDATE to avoid inadvertently changing data elsewhere in the database? A....
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT