MySQL Forums
Forum List  »  Newbie

Re: Function based index on a existing table column
Posted by: Peter Brawley
Date: August 29, 2016 09:09AM

> Ex : where col1 <= col1 +offset

That's equivalent to a constant expression, ...where offset>0... Did you mean where col1 <= col2 + offset?

> if there is a possibility to add an index on (col1 + offset) without adding a new column ?

You answered your own question: "there are no function based indexes". You'll need a stored derived column, eg offset as (col1-col2) stored.

Options: ReplyQuote


Subject
Written By
Posted
Re: Function based index on a existing table column
August 29, 2016 09:09AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.