Re: Bug? JSON functions do not work in nested JSON arrays
Posted by: Anthony Stump
Date: January 16, 2017 02:13PM

So I found the root cause of my problems.

I was adding unneeded complexity to my JSON array from generation.

I was storing in a [{"key":{"subkey":"val","subkey":"val"}}, {"key":{"subkey":"val","subkey":"val"}}]

I was having to find the data in MySQL using json_extract(field, '$**.key') - which was taking roughly 30 seconds to scan the data on 1 single row.

I took the [ ] master array out, now I have the data in a {"key":{"subkey":"val","subkey":"val"}}, {"key":{"subkey":"val","subkey":"val"}} array structure - I can access the data using '$.key' instead of '$**.key' - and it's instant.

Guessing this is a bug or something really wacked up in the way MySQL searches for a key - but this fixed it.

Submitting this as a bug report

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Bug? JSON functions do not work in nested JSON arrays
860
January 16, 2017 02:13PM


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.