Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Your examples regarding MySQL's features are not correct.

Need to apply an index to the result of a function? No problem, use a functional index, supported since October 2018: https://dev.mysql.com/doc/refman/8.0/en/create-index.html#cr...

Need to use a window function? No problem, supported since April 2018: https://dev.mysql.com/doc/refman/8.0/en/window-functions.htm...



sort by: page size:

> Indexing on function expression

MySQL 5.7 fully supports this. See https://dev.mysql.com/doc/refman/5.7/en/create-table-generat... and https://dev.mysql.com/doc/refman/5.7/en/create-table-seconda...

> JSON column (actually MySQL 5.6 supports it but I doubt if it's as good as Postgres)

Actually MySQL 5.6 doesn't support this, but 5.7 does, quite well: https://dev.mysql.com/doc/refman/5.7/en/json.html


Check out the new MySQL 8.0 release candidate. Is has windowing functions now.

https://dev.mysql.com/doc/refman/8.0/en/window-functions.htm...


MySQL now has window functions:

https://mysqlserverteam.com/mysql-8-0-2-introducing-window-f...

And MySQL has strict mode, which I believe is enabled by default on newer versions but available in any 5.x version:

https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sql-mo...


MySQL has a "use index" hint. https://dev.mysql.com/doc/refman/8.0/en/index-hints.html

I may have used it at most once. But I'm not mr big data over here.


> what if there was a different query language with explicit index syntax..

There is, it's a feature in MySQL called Index Hints [1].

[1] https://dev.mysql.com/doc/refman/8.0/en/index-hints.html


MySQL supports spatial indexes exactly for circumstances like this:

http://dev.mysql.com/doc/refman/5.0/en/spatial-extensions.ht...


the mysql documentation definatly states otherwise: http://dev.mysql.com/doc/refman/5.7/en/innodb-create-index-o...

That is a function made by MySQL developers [1]. Why don't you blame Sun or Oracle or a Swedish company whose name I don't remember for this?

[1] https://dev.mysql.com/doc/refman/8.0/en/mysql-escape-string....


MySQL, at least as far back as 2000, had indexes.

http://web.archive.org/web/20020610031610/http://www.mysql.c...


Also, MySQL [1]. Are you sure that you're right and all these major db projects are wrong?

1. note the default value of "bind to *": http://dev.mysql.com/doc/refman/5.7/en/server-options.html#o...


No, that's not true. That function name was copied directly from the MySQL C API. It was not added by PHP.

https://dev.mysql.com/doc/refman/5.5/en/mysql-real-escape-st...


https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html#sql-mo...

Much of your MySQL complaint is not a MySQL issue, but a config issue.

And yes, powerful config options are good, not bad.


That’s no longer true since MySQL8 https://dev.mysql.com/doc/refman/8.0/en/atomic-ddl.html

I also didn't realize MySQL supported these JSON query operators now, huh. Since MySQL 2.7.9 in 2015 apparently? Not that new!

https://dev.mysql.com/doc/refman/5.7/en/json-search-function...


User defined functions[1] in MySQL are dynamic libraries which are loaded and then you attach a function name to. A common example might be a hashing function that you want the DB to understand.[2]

That said, I bet just about every database supports something similar (and postgres' equivalent has already been provided by a sibling comment).

1: https://dev.mysql.com/doc/refman/5.5/en/create-function-udf....

2: https://www.percona.com/doc/percona-server/LATEST/management...


It has been able to use more than one index per table since MySQL 5.0 (2005):

https://dev.mysql.com/doc/refman/5.7/en/index-merge-optimiza...



I believe InnoDB does have this now in MySQL 5.6: http://dev.mysql.com/doc/refman/5.6/en/innodb-fulltext-index...

"Modern SQL" feature overview for MySQL + forks:

https://dveeden.github.io/modern-sql-in-mysql/

(aka "Look, window functions are coming")

next

Legal | privacy