0% found this document useful (0 votes)
17 views4 pages

ICT503 Week 9

The document discusses database performance tuning and query optimization, focusing on strategies such as schema tuning, query optimization, and index adjustments to enhance query execution speed and resource consumption. It highlights the importance of database statistics for efficient query execution and the challenges of indexing, including maintenance and potential performance overhead. Additionally, it provides recommendations for writing optimized SQL code and explains different RAID levels for data storage performance and security.

Uploaded by

honey arguelles
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views4 pages

ICT503 Week 9

The document discusses database performance tuning and query optimization, focusing on strategies such as schema tuning, query optimization, and index adjustments to enhance query execution speed and resource consumption. It highlights the importance of database statistics for efficient query execution and the challenges of indexing, including maintenance and potential performance overhead. Additionally, it provides recommendations for writing optimized SQL code and explains different RAID levels for data storage performance and security.

Uploaded by

honey arguelles
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Week 9 Tutorial

Database Performance Tuning and Query Optimization

Q1: SQL performance is related to the transformation of this system from a slower query-

execution database to a faster one. Such components as schema tuning, query optimization, index

adjustments, and system performance optimizations, will be the basis of the strategy (Dong &

Zeng, 2021).

Q2: The main target of performance tuning, in most cases, is to reduce query response time and

the consumption of resources in the database system. As the data flow in is faster, so is the query

execution. This is because user experience can be improved, hardware utilization can become

better, and scalability is ensured to handle future workloads effectively.

Q3: Database statistics information is derived from both automation and manual methods. Set or

triggered statistics gathering by data updates form the backbone of Oracle Auto-Optimizer, SQL

Server Auto-Update Stats, and PostgreSQL's Auto-Vacuum thus information updates produce set

or triggered changes (Dong & Zeng, 2021). Administrators can also execute collection of

statistics by themselves, using the platform specific commands like the Oracle's

DBMS_STATS.GATHER_TABLE_STATS and PostgreSQL's ANALYZE, which ensures that

the optimizer will have the most up-to-date information and hence it will execute the query

efficiently.
Q4: Indexing across all the columns and for any table is not achievable as it has several reasons.

Also, when it comes to indexes, it is necessary to perform maintenance where the greatly

increasing performance overhead results from updating each index with every change of data.

Second, indices are statistically significant and consequently drive the enterprise storage

spending. Lastly, not all indexes are really beneficial; among these, quite several may never be

used; otherwise, the optimizer's work will become more and more complicated and the

performance may decrease (Dong & Zeng, 2021).

Q5: When writing conditional instructions in SQL code that will help query optimization some

things need to be taken in account. Use indexed columns narrowly while searching, as this is

among the most efficient ways of selection. Use simple and understandable conditions while

avoiding the use of confusing phrases such as in-line conditions which can hinder the processing.

Take into account equality accordingly, as it is less time-consuming than using range or

inequality conditions. Keep in mind the data types and keep away from the implicit conversions

which will avoid range scan index usage.

Q6: RAID is the abbreviation of Redundant Array of Investment Disks. Some of the RAID levels

that are used frequently are RAID 0, which ensures a tremendous data striping and offers no

redundancy, RAID 1, which mirrors the data in two disks, thus it delivers excellent data and

RAID 5 that combines data striping and parity that is distributed among at least three disks, so it

provides readers with a great performance and security.

Q7:
a. Since the EMP_SEX column is typically be filled with only the two distinct values ('M' and

'F'), the likelihood of having low data sparsity is very high. In simple terms, it could be expressed

that the data is therefore not very distinctive and rather frequent.

b. For performance enhancement, the query should be put in a composite index based on the

columns referred to in the WHERE clause. The columns mentioned in the ORDER BY clause

would then benefit from an index which will help in the sorting of values:

sql command;

CREATE INDEX idx_sex_areacode ON EMPLOYEE (EMP_SEX, EMP_AREACODE);

CREATE INDEX idx_lname_fname ON EMPLOYEE (EMP_LNAME, EMP_FNAME);


Reference

Dong, X., & Zeng, L. (2021). Research on Query Optimization of Classic Art Database Based on

Artificial Intelligence and Edge Computing. Wireless Communications and Mobile

Computing, 2021, 1–11. https://doi.org/10.1155/2021/6118113

You might also like