[Maria-discuss] virtual columns and indexes on attributes in JSON objects
Does the support for virtual columns allow an index to be created on an attribute in a JSON object stored in a BLOB column? http://falseisnotnull.wordpress.com/2014/04/25/descending-indexes-in-mariadb https://mariadb.com/kb/en/virtual-columns/ -- Mark Callaghan mdcallag@gmail.com
If you can write an expression which returns the JSON attribute, yes, the (trivial) technique I described in the post can do that. I think that MySQL 5.7 JSON functions are not yet in MariaDB. But maybe they can be added easily? Or again, maybe you can use MariaDB 10 regexp's? Federico -------------------------------------------- El sáb, 26/4/14, MARK CALLAGHAN <mdcallag@gmail.com> escribió: Asunto: [Maria-discuss] virtual columns and indexes on attributes in JSON objects Para: "Maria Discuss" <maria-discuss@lists.launchpad.net> Fecha: sábado, 26 de abril, 2014 17:29 Does the support for virtual columns allow an index to be created on an attribute in a JSON object stored in a BLOB column? http://falseisnotnull.wordpress.com/2014/04/25/descending-indexes-in-mariadb https://mariadb.com/kb/en/virtual-columns/ -- Mark Callaghan mdcallag@gmail.com -----Adjunto en línea a continuación----- _______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
there're others things we could support: https://mariadb.atlassian.net/browse/MDEV-4430 https://mariadb.atlassian.net/browse/MDEV-4414 https://mariadb.atlassian.net/browse/MDEV-4419 2014-04-26 13:18 GMT-03:00 Federico Razzoli <federico_raz@yahoo.it>:
If you can write an expression which returns the JSON attribute, yes, the (trivial) technique I described in the post can do that. I think that MySQL 5.7 JSON functions are not yet in MariaDB. But maybe they can be added easily? Or again, maybe you can use MariaDB 10 regexp's?
Federico
-------------------------------------------- El sáb, 26/4/14, MARK CALLAGHAN <mdcallag@gmail.com> escribió:
Asunto: [Maria-discuss] virtual columns and indexes on attributes in JSON objects Para: "Maria Discuss" <maria-discuss@lists.launchpad.net> Fecha: sábado, 26 de abril, 2014 17:29
Does the support for virtual columns allow an index to be created on an attribute in a JSON object stored in a BLOB column?
http://falseisnotnull.wordpress.com/2014/04/25/descending-indexes-in-mariadb
https://mariadb.com/kb/en/virtual-columns/
-- Mark Callaghan mdcallag@gmail.com
-----Adjunto en línea a continuación-----
_______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
_______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
-- Roberto Spadim SPAEmpresarial Eng. Automação e Controle
Sure, you can do that. You do it by creating a persistent virtual column on the attribute, using COLUMN_GET probably, and then creating a column on that. In a presentation on JSON and MySQL / MariaDB I show a simple example of this: http://www.slideshare.net/blueskarlsson/using-json-with-mariadb-and-mysql See slide 20 Of course we would like this to be even smarter, but this is what is available and works as we speak. /Karlsson MARK CALLAGHAN skrev 2014-04-26 17:29:
Does the support for virtual columns allow an index to be created on an attribute in a JSON object stored in a BLOB column?
http://falseisnotnull.wordpress.com/2014/04/25/descending-indexes-in-mariadb https://mariadb.com/kb/en/virtual-columns/
-- Mark Callaghan mdcallag@gmail.com <mailto:mdcallag@gmail.com>
_______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
-- Anders Karlsson, Senior Sales Engineer SkySQL | t: +46 708-608-121 | Skype: drdatabase
participants (4)
-
Anders Karlsson
-
Federico Razzoli
-
MARK CALLAGHAN
-
Roberto Spadim