Question: 2 . What index would you create to speed this query on a table with no indexes: select * from mytable where fieldA = 'val

2. What index would you create to speed this query on a table with no indexes: select * from mytable where fieldA = 'val1' order by fieldB limit 10?
3. What index would you create to speed this query on a table with no indexes: select fieldA, min(fieldC) from mytable where fieldB = 'val1' group by fieldA?
4. Given this schema:
mytable1( fieldIndex1, fieldA )
mytable2( fieldIndex2, fieldB (FK to mytable1), fieldC, fieldD )
What indexes would you create to speed this query on a table with no indexes: select mytable1.fieldA, mytable2.fieldD from mytable1 join mytable2 on mytable1.fieldIndex1= mytable2.fieldB where mytable2.fieldC ='A'?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!