Past ExamsRwanda ICT preparation

Topics / Database

The Surname column is indexed. WHERE Surname LIKE 'Uwi%' is fast, but WHERE Surname LIKE '%mana' scans the whole table. Why?

La colonne Surname est indexée. WHERE Surname LIKE 'Uwi%' est rapide, mais WHERE Surname LIKE '%mana' parcourt toute la table. Pourquoi ?

Answers
AThe second query needs a password before it can use the indexLa seconde requête a besoin d'un mot de passe avant de pouvoir utiliser l'index
BA normal index is sorted from the start; a leading % gives no startUn index normal est trié depuis le début ; un % initial ne donne aucun point de départ
CLIKE never uses indexes under any circumstancesLIKE n'utilise jamais d'index, en aucun cas
DThe database is out of memoryLa base manque de mémoire
The answer and explanation are in the full bank.

This question is one of 2,831 in the paid banks. Each comes with the correct answer and the reasoning behind it, not just a mark.

Unlock for 5,000 RWF

MIFOTRA exam practicealigned to Practice set: Database Management·3 marks·Hard

More Database questions