An application packs several fields of information into the details column of the table
sensors. The first six characters of that data represent a location code.
Example: “ABCDEFOO –ooozzz comments will be here FIELDS—-FIELD64”
Given the query pattern:
SELECT—-FROM sensors WHERE details LIKE ‘ABCDEF
Which three ALTER TABLE commands enable the optimizer to user an index for this
WHERE patterns?
A.
ALTER TABLE sensors ADD KEY (details ) USING BTREE
B.
ALTER TABLE sensors ADD KEY (details) USING HASH
C.
ALTER TABLE sensors ADD KEY (details) USING BTREE
D.
ALTER TABLE sensors ADD KEY (details )USING HASH
E.
ALTER TABLE sensors ADD FULLTEX (details)
When using a like ‘ABCDEF’ Hash does nothing for you so it would be A,C,E
I guess A,C,E too
b-tree can be used for LIKE and hash can be used ONLY for comparison with () and for smoking ..
so aaaaaa,ccccccc,eeeeeee
comparison with
more than , and less than