Materialized view manually
Materialized view plays an important role in data analysis of database( Related concept record link )However, MySQL and other databases only have ordinary views and do not implement materialized views. We can manually implement similar functions according to the idea of materialized view, that is, use an entity table to store frequently accesse ...
Posted by bocasz on Sat, 15 Jan 2022 08:08:47 +0100
MySQL counts by conditions, count() function. Can you understand how the optimizer counts
In the project, when a statistical demand is encountered, statistics are made from a table according to conditions, and count(distinct case when) is used to solve this problem.
count() function
In statistics, count appears most frequently
Simplest usage
select count(*) from table where ....
select count(distinct column_name) from table whe ...
Posted by mparab on Sat, 15 Jan 2022 07:10:59 +0100
SpringBoot advanced usage
1, SpringBoot advanced usage
1. Lombok plugin
1.1) Maven coordinate query
website: https://mvnrepository.com/ You can now find information about the maven package
1.2) add jar package file
<!--add to lombok rely on-->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId&g ...
Posted by atulkul on Sat, 15 Jan 2022 06:02:08 +0100
Application of Rust beauty iterator in algorithm
prefaceIn this paper, we will introduce several methods related to iterators in Rust language from a simple algorithm problem to help you understand chars, all, try_ fold,enumerate,try_ for_ each,char_ Use of indices. The title is as followsWe define that capitalized words are correct when:quoteAll letters are capitalized, such as "USA&qu ...
Posted by Cook on Sat, 15 Jan 2022 05:51:22 +0100
Use MySQL, use JSON card well
Click "Lifetime", Focus, Top Public Number
Daily Technical Dry, First Time Delivery!
Relational structured storage has some drawbacks because it requires all columns and their corresponding types to be predefined. However, the business may need to expand the descriptive capabilities of individual columns as it evolves, and w ...
Posted by escabiz on Fri, 14 Jan 2022 23:13:59 +0100
Session session (super detailed)
1, What is a Session
Session is an interface (HttpSession).A Session is a Session. It is a technology used to maintain an association between a client and a server.Each client has its own Session.In the Session session, we often use it to save the information after the user logs in.
2, How to create a Session and get (id number, new or not)
H ...
Posted by buildakicker on Fri, 14 Jan 2022 21:32:03 +0100
Redis introduction and installation
Redis (Remote Dictionary Server), that is, the remote dictionary service, is an open source service using ANSI C language Write, support network, memory based and persistent log type, key value database , and provides API s in multiple languages
Redis's role:
In memory storage, persistence (RDB and AOF)Efficient and can be used for cachin ...
Posted by mforan on Fri, 14 Jan 2022 21:11:50 +0100
Advanced operation of MySQL table
Database Constraints
Constraint type
NOT NULL: indicates that a column cannot store a NULL value, that is, it must be assigned a value, otherwise an error is reported;UNIQUE: ensure that each row of a column must be a UNIQUE value;DEFAULT: Specifies the DEFAULT value when no value is assigned to the column;PRIMARY KEY: the combination of ...
Posted by fitzsic on Fri, 14 Jan 2022 13:31:05 +0100
Query based on mysql
Basic query
Basic grammar
select [distinct] * | {colunm1,colunm2,...}
from table_name;
characteristic
1,The query list can be fields, constants, expressions, functions, or multiple
2,The query result is a virtual table
Basic query statement
SELECT 1; #There are no clauses
SELECT 9/2; #There are no clauses
SELECT Identifies which co ...
Posted by Dragen on Fri, 14 Jan 2022 13:30:41 +0100
Redis cluster of redis
1. Defects of sentinel mode
In sentinel mode, there is still only one Master node. Sentinel mode does not relieve write pressure when concurrent write requests are large.
2. Redis cluster concept
(1) A distributed network service cluster composed of multiple Redis servers;
(2) There are multiple Master master nodes in the cluster, and each ...
Posted by chadowch on Fri, 14 Jan 2022 10:27:36 +0100