Tag:Primary key

  • An analysis of SQL query optimization principle (900w+ data, from 17s to 300ms)


    There is a financial flow table, which is not divided into databases and tables. The current data volume is 9555695. The paging query uses limit. The query before optimization takes 16 s 938 MS (execution: 16 s 831 MS, fetching: 107 MS). After adjusting SQL in the following way, it takes 347 MS (execution: 163 […]

  • Mybatis uses traps


    Cache is not row based “Caching is not row based” means that the granularity of mybatis cache is all query results, not each row of query results, which means that each query has only one cache, rather than a few lines. This is very different from hibernate. The cache of Hibernate is based on each […]

  • Implementation scheme of iteration and combination mode of general tree structure


    In the daily development process. Tree structure is used very frequently. For example: company organizational structure, various classification structures, grouping structures, etc.         SET FOREIGN_KEY_CHECKS = 0; CREATE TABLE IF NOT EXISTS `tbl_sapo_group` ( `id` int(10) unsigned NOT NULL AUTO_ Increment comment ‘primary key’, `Code ` varchar (100) not null comment ‘unique […]

  • Spring framework and mybatis framework are integrated to solve the problem according to the gourd


    1. Title Description 2. Reference solutions Bookcontroller.java under com.controller package package com.controller; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import com.dao.BookDao; import com.po.MyBook; @Controller(“bookController”) public class BookController { @Autowired private BookDao bookDao; public void test() { //Query a book record MyBook abook = bookDao.selectBookBySN(1); System.out.println(abook); System.out.println(“================”); //Add a book record MyBook addmb = new MyBook(); Addmb.setbookname […]

  • Clickhouse primary key collation (from the network)


    Clickhouse’s primary key index adopts a sparse index, which divides each column of data according to index granularity (8192 rows by default). The advantage of sparse index is that the entries are relatively dense, the index is less, it can be loaded into memory, and the cost of indexing during insertion is relatively small.Clickhouse data […]

  • Complete Mysql to elasticsearch migration synchronization in 5 minutes – cloudcanal actual battle


    sketch This article introduces how to create one in five minutes through cloudcanalLong term stable operationMySQL – > elasticsearch (hereinafter referred to as ES) real-time data migration synchronization link. Technical insider Current limiting In the process of Mysql to es data migration and synchronization, we often face a large problem of source side writing to […]

  • Learn more about mybatis through the project


    Mybatis Mybatis and springmvc are driven by order item cases Official Chinese Address: http://www.mybatis.org/mybati… Official custody address: https://github.com/mybatis/my… All codes and addresses of this project: https://github.com/zhisheng17… First article address: http://blog.csdn.net/tzs_1041… Basic knowledge: Summarize the problems of the original JDBC program (developed with JDBC alone) 1. Environment Java environment: jdk1.8.0_ seventy-seven Development tool: idea 2016.1 Database: […]

  • Issue 35: MySQL data vertical splitting


    introduction Generally speaking, when it comes to data splitting, it can be summed up in two levels: one is vertical splitting, and the other is horizontal splitting. Here we discuss vertical splitting. Vertical splitting is a method to split databases, tables, columns, etc. text In mysql, vertical splitting can be divided into: vertical database splitting […]

  • Good programmer big data learning route HBase quick start


    Good programmer big data learning route HBase quick start HBase introduction1. What is HBase Apache HBase is a Hadoop database, a distributed and scalable big data storage.When you need random and real-time read / write access to big data, please use Apache HBase. The goal of this project is to host very large tables – […]

  • Tips for using API post


    preface With the development of web technology, especially the front-end and back-end separated architecture primary key has become the mainstream. When debugging, our back-end programmers no longer rely on the page to operate, but directly debug the interface. For the get interface without permission control, this is a very easy job, but for the rest […]

  • Gorm of golang’s ORM framework


    preface The full name of ORM is object relational mapping, which maps the object/structure data type in the programming language to a table in the relational database. The following is the detailed mapping relationship. Structure ———– data sheet Structure example ——— 1 record in the table Structure field ———– structure field   gormbrief introduction For […]

  • Solve the problem that mybatis universal mapper cannot echo using UUID as the primary key


    Solve the problem that the generic mapperuuid cannot be echoed First of all, I would like to recommend a very good mybatis plug-in website http://mybatis.tk/ , you who use mbatis can go to this website to see the mybatis plug-in.I encountered a problem when I built the springboot+mybatis+mybatisgenerator framework myself. I built the demo in […]