Tag:db

  • Detailed explanation of mongodb compact command

    Time:2020-1-1

    Why compact is needed A picture is worth a thousand words The difference between remove and drop There are two ways to delete all documents in a collection in mongodb db.collection.remove({}, {multi: true}), delete one by one from BTREE, and finally all documents are deleted, but the file physical space will not be recycled db.collection.drop()Delete […]

  • Reading notes of mongodb actual combat

    Time:2019-11-9

    I watched mongodb real battle before and after the national day. Combined with the work of cloud database in the first half of the year and my own experience in using Mongo, I made a summary. This article is from foundation, coding and optimization and advanced: index, copy and fragment of Xintan blog. More articles […]

  • Tp5 (ThinkPHP5 Framework) An Example of Batch Delete Function Using DB

    Time:2019-9-28

    This paper illustrates how TP5 (ThinkPHP5 framework) uses DB to implement batch deletion. Share for your reference, as follows: 1-Front-end Page html <a href=”javascript:;” rel=”external nofollow” onclick=”datadel()”> <i></i>Batch deletion</a> <td><input type=”checkbox” value=”{$category.id}” name=”id”></td> js function datadel(obj){ Layer. confirm (‘confirm to delete in batches? ‘, function (index){ var id=new Array(); $(‘input[name=”id”]:checked’).each(function(){ ID. push ($(this). val ();// […]

  • Mongo DB Add, Delete and Change Check Command

    Time:2019-9-28

    List and select 1.1 Lists all databases > show dbs local 0.000GB myblog 0.000GB 1.2 Use a database > use myblog switched to db myblog 1.3 Lists all collections > show collections articles replicationColletion sessions users wangduanduan 2 Insert data insert (value) // Insert data into existing collections > db.users.insert({name:’hh’,age:23}) Inserted 1 record(s) in 43ms […]

  • Pits encountered in database operations

    Time:2019-8-22

    This article is mainly about recording some pits I encountered in using the database and updating them from time to time. ## Case 1 SqlServer 2008## Scene:Data docking and video search for partners Specific realizationPartners provide data interfaces, and then we synchronize data by crawling partners’interfaces. Every time we crawl in full, but the warehousing […]

  • OpenSUSE installs PostgreSQL

    Time:2019-5-5

    Environment: openSUSE Leap 42.2 Since Ubuntu abandoned Unity to Gnome, I have abandoned Ubuntu to open SUSE.Leap’s software version is a bit old (for example, Vim still stays at 7.4), and the benefits are stability, elegance and ease of mind. The rolling release of Tumbleweed is still a bit short of breath. After trial, it […]

  • Django database automatic reconnection

    Time:2019-4-9

    brief introduction Automatically reconnect the Django database when the connection exceeds wait_timeout and the connection is lost https://github.com/zhanghaofe… install pip install django_db_reconnect Note that only supportpymysqlMake Django usepymysqlYou need to install the package first and add the following code to _init_.py in the directory where settings.py is located: import pymysql pymysql.install_as_MySQLdb() Use Add todjango_db_reconnectINSTALLED_APPS to […]

  • ThinkGo: A Lightweight MVC Framework for Go Language

    Time:2019-4-4

    ThinkGo is a lightweight MVC framework of Go language. It currently supports the basic functions of Web frameworks such as routing, middleware, controller, request, response, Session, view, log, cache, ORM and so on. ThinkGo is committed to making the code concise and expressive, and helping developers build a Web application quickly. Characteristic Simple routing to […]