Re: Bug? JSON functions do not work in nested JSON arrays
Posted by: Anthony Stump
Date: January 15, 2017 01:06PM

Additionally, using ** finds the data, but extremely slowly

select JSON_EXTRACT('[{"KOJC":{"Tmp":"25"}}, {"KTWX":{"Tmp":"32"}}]', '$**.KOJC');
+----------------------------------------------------------------------------+
| JSON_EXTRACT('[{"KOJC":{"Tmp":"25"}}, {"KTWX":{"Tmp":"32"}}]', '$**.KOJC') |
+----------------------------------------------------------------------------+
| [{"Tmp": "25"}] |
+----------------------------------------------------------------------------+
1 row in set (1.77 sec)

This takes almost 2 seconds, on a 16 GB RAM 8-core Intel 4790k processor! PHP can rip out the entire JSON string and search for the data faster!

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Bug? JSON functions do not work in nested JSON arrays
705
January 15, 2017 01:06PM


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.