I have a question about Indexes in DBMS. I know that they improve the performance by locating the data faster. But my questions is, want type of index would I use for a certain Database ?
Here is a question that I have from a sample exam:
The following problems are based on the ER model shown on the query.
The SaleCo ER Model
SELECT P_CODE, P_DESCRIPT, P_PRICE, PRODUCT.V_CODE, V_STATE
FROM PRODUCT P, VENDOR V
WHERE P.V_CODE = V.V_CODE
AND V_STATE = ‘NY’
AND V_AREACODE = ‘212’;
ORDER BY P_PRICE;
-What indexes would I recommend for this query? why?
-How to write the commands required to create the indexes I recommended.
-How to write the command(s) used to generate the statistics for the PRODUCT and VENDOR tables.
there should be a model shown , but there isn't as its a sample exam to show you what to expect!
I would really appreciate it if someone could help understand the criteria of recommending an index by looking at the code, and how to create it. If the question I posted (the code) is unclear, please give a different example.
Thank you very much in advance