Home:ALL Converter>Can i improve it?

Can i improve it?

Ask Time:2016-12-08T09:52:43         Author:Harry

Json Formatter

i have implemented a query search for all entries with the year 2014 by following code. Can we consider this design of index and select optimal for given query from performance perspective?

CREATE INDEX item_idx ON item (created);

SELECT text, created
FROM item
WHERE YEAR(created) = '2014’;

is it an optimal solution or there can be an improvement possible ?

Author:Harry,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/41030506/can-i-improve-it
yy