Tag:Indexes

  • MySQL optimization 3 (optimization rules)

    Time:2021-4-20

    When you look at the following content, make sure you can use explain to analyze SQL! Single index table optimization case: Question:For example, we want to query the first record sorted by user name with password = 666 and age > 30. After analysis, we will find that the SQL internal optimizer has carried out […]

  • Case analysis of establishing efficient index in MySQL

    Time:2021-4-20

    This paper introduces how to build an efficient index with MySQL. The details are as follows: How to build an ideal index? Query frequency discriminative power Index length Override field discriminative power Assuming 1 million users and 50 W for each gender, the discrimination is low. The length is small Index length directly affects the […]

  • Redis design and implementation 4: Dictionary Dict

    Time:2021-4-19

    In redis, the dictionary is the infrastructure. Redis database data, expiration time and hash type all take the dictionary as the underlying structure. Structure of dictionary Hashtable The implementation code of hash table is as follows:dict.h/dictht The dictionary of redis is implemented in the form of hash table. typedef struct dictht { //Hash table array, […]

  • Go to realize java virtual machine 03

    Time:2021-4-19

    In the last article, we have read the bytecode file we need according to the path java.lang.Object Taking this class as an example, you can see something like the following. What are these numbers?   To understand this, we can probably guess that it’s decimal. Let’s turn decimal to hexadecimal online https://tool.oschina.net/hexconvert/ Note that each […]

  • Detailed explanation of binary search algorithm

    Time:2021-4-17

    Binary search [toc] The most basic binary search int binarySearch(int[] nums, int target) { int left = 0; int right = nums.length -1; // Note while(left <= right) { Int mid = left + (right – left) / 2; // Note: if (right + left) / 2 is used, overflow will occur if(nums[mid] == target) […]

  • Summary after reading MySQL (2)

    Time:2021-4-15

    A series of articles: Summary after reading MySQL Summary after reading MySQL (2) Summary after reading MySQL (3) Display random messages correctly The home page of an English learning app has a function of randomly displaying words, that is, there is a word list according to the level of each user, and then each time […]

  • Explicit use of table lock and row level lock in MariaDB

    Time:2021-4-14

    First of all, let’s take a look at the concept of locking in MariaDB. When a process or transaction is operating on a resource, in order to prevent other users or processes or transactions from operating on it, which will lead to resource preemption and conflict, the resource will be locked when a process operates […]

  • Suggestions on MySQL high performance optimization specification

    Time:2021-4-14

    Database command specification All database object names must be lowercase and separated by underscores All database object names are prohibited to use MySQL reserved keywords (if the table name contains keywords for query, it needs to be enclosed in single quotation marks) The naming of database objects should be able to see the name and […]

  • MySQL Optimization: Performance Analysis of like and =

    Time:2021-4-14

    introduction Most of the people who have used the database know the similarities and differences between the functions of like and = signs 1, difference: like can be used as fuzzy query, but ‘=’ does not support this function. For example, query the data whose first letter of field ID in info table is 1 […]

  • Introduction to pandas (1)

    Time:2021-4-14

    Data analysis and processing library import pandas as pd df=pd.read_csv(“./pandas/data/titanic.csv”) df.head (N) Read the first n rows of data df.head(6) df.info () get a brief summary of the dataframe df.info() <class ‘pandas.core.frame.DataFrame’> RangeIndex: 891 entries, 0 to 890 Data columns (total 12 columns): # Column Non-Null Count Dtype — —— ————– —– 0 PassengerId 891 […]

  • Hacking with angular: how to get different levels of $Index in deep nested ngrepeat

    Time:2021-4-13

    usengRepeatWhen we give instructions, we usually pass them$indexGet the index of each cycle in the current level, but we will still use it when there is an array (array a) in the data we cyclengRepeatLet’s loop through this array. But at this time, if we still need the index of each item in array a […]

  • Still hand knock model code, to experience the go zero code generated automatically!

    Time:2021-4-12

    Transferred fromgo-zeroclickView the originalGo zero microservice library addresshttps://github.com/tal-tech/go-zero Goctl Model Goctl model is one of the components in the tool module of go zero. At present, it supports identifying MySQL DDL for model layer code generation. Through the command line or idea plug-in (soon to be supported), it can selectively generate code logic with or […]