My mongoDb trip (two)

Preface: Last time, we simply increase or decrease in operating some change search operation, this time, come to be a wonderful trip

First, to explain the case

At (1), and the value field has no single data value

 

 

 

The first title this data field (mysql with a long time, used to be so called) is no data, the last piece of data, is there, before I explain by operating mysql, even if there is no value, taking data out, if you do not limit field names will come out of a null

 

Data speak:

(Last) F: \ wamp64 \ www \ xxxxx \ application \ index \ controller \ Test.php: 48:

array (size=5)   'name' => string '15698293845d91b208011150.92650917' (length=33) 

  'age' => int 0

   'title' => string 'What time is 15:43:04 2019-09-30' (length = 34 is)

   'time' => int 1569829384 

   'id' => string '5d91b208a374a412e8000755' (length=24)

 

(Article) F: \ wamp64 \ www \ xxxxx \ application \ index \ controller \ Test.php: 48:

array (size=4)   'name' => string '15698266425d91a7521c35a4.86084823' (length=33)

   'age' => int 2

   'time' => int 1569826642

   'id' => string '5d91a752a374a412e800074c' (length=24)

 

But see the above two data taken out, It's a bit ..................................... .....................................

Query all the time, too

Array (    

  [0] => Array         (            

     [name] => 15698266425d91a7521c35a4.86084823           

     [age] => 2           

          [time] => 1569826642            

          [id] => 5d91a752a374a412e800074c        

  )     

  [1] => Array         (            

    [name] => 15698266435d91a7530c98f3.33312434            

    [age] => 1            

    [time] => 1569826643            

    [id] => 5d91a753a374a412e800074d        

  ) ...............     

  [9] => Array         (             

    [name] => 15698293845d91b208011150.92650917            

    [age] => 0            

    [Title] => What time is it 2019-09-30 15:43:04            

    [time] => 1569829384            

    [id] => 5d91b208a374a412e8000755        

  ) 

)

Means that, in the fight to sql time, and finally take on the stitching data, and that does not support complex business, if you just do a data field will not change the basic operations, such as (log management, etc.) recommended use elasticsearch, an efficient search server.

 

Guess you like

Origin www.cnblogs.com/FLy-1992/p/11613310.html