What index should be created on a relational table DEPARTMENT created over a relational schema Department(dname, chairperson, budget)
to speed up the following query ?
SELECT * FROM DEPARTMENT ORDER BY budget;
An index on an attribute (budget) allows for horizontal traversal of leaf level of an index, accessing a relational table in the ascending order of the values of an attribute budget and avoids sorting a relational table over budget.
CREATE INDEX DEPT_IDX_BUDGET ON DEPARTMENT(budget);
What index should be created on a relational table DEPARTMENT created over a relational schema Department(dname, chairperson, budget)
to speed up the following query
SELECT chairperson, budget, count(*) FROM DEPARTMENT GROUP BY budget, chairperson;
An composite key index on the attributes (budget,chairperson) allows for horizontal traversal of leaf level of an index, counting the total number of row identifiers associated with each key and it avoids grouping of a relational table over the values of (budget,chairperson)
CREATE INDEX DEPT_IDX_BC ON DEPARTMENT(budget,chairperson);
What index should be created on a relational table DEPARTMENT created over a relational schema Department(dname, chairperson, budget)
to speed up the following query
SELECT chairperson, budget, count(*) FROM DEPARTMENT GROUP BY chairperson, budget;
An composite key index on the attributes (chairperson,budget) allows for horizontal traversal of leaf level of an index, counting the total number of row identifiers associated with each kyy and it avoids grouping of a relational table over the values of (chairperson,budget)
CREATE INDEX DEPT_IDX_BC ON DEPARTMENT(budget,chairperson);