1

In oracle , we can do:

 CREATE INDEX idx_1 ON table_1 ( func_1(col_1), func_2(col_2), func_3(col_3) );

but, we can not do this in mysql.

I think it is not very complicated to support a functional index.

I wonder why mysql does not support it. Does anyone know the reason?

aasa
  • 207
  • 1
  • 7
  • 4
    This question appears to be off-topic because you're asking the wrong people, you should ask the MySQL developers why they do and do not support certain features. – mu is too short Nov 12 '13 at 03:30
  • 1
    duplicate of http://stackoverflow.com/questions/10595037/is-it-possible-to-have-function-based-index-in-mysql – shankar Nov 12 '13 at 03:33

1 Answers1

1

This feature request has been made in the past, circa 2004. See Bug #4990 Functional Indexes.

I'm glad you think it is not complicated. MySQL is open source, and they welcome external contributions. So you could always just code up this simple feature and attach your patch to that bug log.

The reason it has not been done is the same reason that every feature is or is not done in any project: the developers make their best judgement about which features or improvements will benefit the greatest number of their users, and they prioritize those.

A lot of the core development done in the past 5-8 years in MySQL and InnoDB has focused on scalability on multi-core processor architectures, which was considered to be of great benefit to all users of MySQL, and an area where MySQL was once considerably weaker than it is now.

Bill Karwin
  • 538,548
  • 86
  • 673
  • 828