Share
Explore BrainMass

Oracle9i Database SQL Search Query Optimization

The newspaper had added a special deal for the classified ads online. For a small fee, the words "BEST BUY" are added to the text of the ad, and these ads are listed on a special "Best Buy" page online. The online classified section has a query to bring up all the ads that qualify, but it runs very slowly. Here is the query.

SELECT AD_TEXT, AD_NO
FROM CLASSMATE.CLASSIFIED_AD
WHERE INSTR(AD_TEXT, 'BEST BUY') > 0

Create an index that will be used for this query and therefore speed up its response time. Save your SQL in a file.

Attachments

$2.19