¶ … Database Developer (based on job I worked on).
Syntax and Semantic Analysis
-- The Syntax errors involved misuse of keywords.
The Semantic errors involved misuse of columns and tables - there were incompatible data types.
To elaborate, the syntax refers to the structure of the program and syntactic analysis checks for errors in aspects like spelling or whether ibraces are missing in which case the program would fail syntactically.
Semantic errors, on the other hand refer to the essential meaning of the content -- whether it all makes sense and whether it is accurate (for instance writing "the sun rises in the west") is a semantic error for this is incorrect. I would have to ascertain that all data placed in tables and columns was accurate in both context and form.
b. Query Transformation
I transformed the query into simplified and standardized format based on relational algebra. Some query transformations need to be costed in order to be chosen and some not. For instance, if a table is eliminated totally from the join, then need to cost that consequent applied transformation is minimal since functional behavior is barely altered.
Table profiles are inputs to access plans. An access plan is a tree of decisions about file structures to perform query. The query optimizer chooses the access path based on which access paths are available for the statement as well as on the estimated cost of executing the statement, using each access path or using a combination of paths
Each operation in the plan has a cost formula that estimates the PRA and CPU operations.
C. Access Plan Evaluation
-- The query optimization component evaluated many access plans and the access plan with the lowest cost was selected. The optimizer first determined which access paths were available by examining the conditions in the statement's WHERE clause and its FROM clause. It then generated a set of possible execution plans using available access paths and estimating the cost of each plan, using the statistics for the index, columns, and tables accessible to the statement. Finally, it chose the execution plan with the lowest possible cost.
I instructed the optimizer to use a specific access path by using a hint.
d. Access Plan Execution
-- Executes the selected access plan.
I used the EXPLAIN PLAN command for looking at the execution plan of the SQL.
2. Provide examples of errors that you had during your professional experiences.
I had been frustrated with questions that included the following: why the query was running slow; why one query was going slower than another; I wondered whether my index was getting used, and if not, why not... The execution plan told me how the query would be executed, but I had trouble following the steps and had to be habituated to it. Syntactic analysis took a while.
As novitiate, I had difficulty in the beginning reading the code (in the results of the query) as well as understanding the different graphical, text and XML execution plans. The Graphical Plans were somewhat easier to read than the Text Plans, although the detailed data (of graph) was somewhat harder. The format that may have been the most obscure for me was the SHOWPLAN_TEXT
I had also been advised to do certain things for querying and working with the plan cache. I had to run a certain SQL script in order to see how long a plan takes to compile. In the beginning, I had to ask someone in order to understand the objects within the cache (in order to see how the optimizer and storage engine created my plan).
You’re 86% through this paper. Sign up to read the full paper.
Sign Up Now — Instant Access Already a member? Log inAlways verify citation format against your institution’s current style guide requirements.