Question: A website's internal search engine stores in the following table the number of times each phrase ( in lower case form ) was searched for:
A website's internal search engine stores in the following table the number of times each phrase in lower case form was searched for:
TABLE searchedPhrases
id INTEGER PRIMARY KEY NOT NULL,
text VARCHAR NOT NULL,
count INTEGER NOT NULL
Autocomplete suggestions are generated using the following SQL query where inputtext is in lower case form:
SELECT text FROM searchedPhrases WHERE text
LIKE 'inputtexts' ORDER BY count DESC
Write an SQL statement to create an index that will improve the performance of this query.
See the example case for more details.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
