Answer the question
In order to leave comments, you need to log in
Which is faster with PHP 7.0 or MySQL 5.7 json data?
There are about 10,000 records in MySQL, you need to select all of them, a few columns and some data from a json field.
Which of the following will be faster?
1) Select all the data from the json field with a query, then pull out the necessary values in php
2) Extract the necessary values from the json field using MySQL?
Maybe there are other options?
If you do not know the answer, tell me how to test?
Thanks in advance
Answer the question
In order to leave comments, you need to log in
Pull out using MySQL, so in addition, reduce the traffic between the database and the application.
If this is a one-time operation (migration), then do what is more convenient (it's faster to write code).
If this is a regular operation, then you need to make the correct database structure.
I think php is easier. ran through json_decode and take what you need
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question