Analysis and generation of ShardingSphere statements
brief introduction
In the previous article, we found a critical path code for converting logical SQL to real SQL. In this article, we will explore some details of statement parsing generation based on the previous article
Source code analysis
The code generated by the key parsing of the statement is as follows:
@RequiredArgsConstructor
publ ...
Posted by kaitan on Thu, 02 Sep 2021 17:44:03 -0700
Views and indexes
1, View (keyword: view)
1. View creation
-- Basic format for creating views: create view <View name> as <Query statement>;
-- The essence of view is to use<View name>replace<Query statement>,This is equivalent to aliasing the query statement.
select * from class; create view v_c as select * from class;
-- Created a ...
Posted by CAM on Wed, 01 Sep 2021 17:04:33 -0700
SQL practice: how to calculate user retention with SQL
How to calculate user retention problems with sql
1, Retained
1. Meaning of retention:
Retained: refers to the number of users who arrive at the APP on the base date and return to the APP on the next n days;
Retention rate = number of users returned on the day n days after the base date / number of users on the base date * 100%
Or refers t ...
Posted by punked on Wed, 01 Sep 2021 15:35:54 -0700
Simple optimization of EF Core
Summary
This article is a relatively low and simple point of knowledge
1, Delayed Loading (Lazy Loading)
Postpone loading until data usage;Only when accessing methods such as ToList/ToArray/First/FirstOrDefault(), delayed loading of navigation properties, etc.Only load data
Example of delayed loading of navigation attributes using a proxy a ...
Posted by Jay_Seagrave on Wed, 01 Sep 2021 09:51:47 -0700
Hiberante reverse-generates database tables
1,hibernate.cfg.xml
Comment out this section of configuration
<!--Update database level automatically-->
<!--<property name="hbm2ddl.auto">create</property>-->
2. New Generate Database Table Tool Class
public class HibernateSchemaExport {
static Session session;
static Configuration ...
Posted by rigi2 on Sat, 18 Jul 2020 08:49:13 -0700
MySQL Database Event Timer Execution Task
1. Background
Because the business of the project is constantly moving forward, it is unavoidable that the number of tables in the database will become larger and larger, constantly squeezing hard disk space.Business growth cannot be sustained even with the greatest amount of space, so it is necessary to regularly delete unnecessary data.A tab ...
Posted by squizz on Sat, 18 Jul 2020 08:15:03 -0700
Picture deletion for laravel-admin
There is a deep doubt about laravel-admin's picture upload mechanism. Deleting avatar pictures on the user information page will cause an error. It was 1.4 at that time, and later updated 1.5 found that the delete button disappeared directly. If you use image normally in the form during the process of use, the slight ...
Posted by Permutant on Sat, 18 Jul 2020 07:40:26 -0700
java ajax instantly verifies that the same classification exists in the database
When I do the project again, the customer needs me to implement a function, probably when adding classifications, if the database has the same classifications, the jsp interface will prompt for information and cannot be added successfully.The results are as follows:
Below is the idea for implementation:
1. First implement an onblur event in ...
Posted by BLeez on Fri, 17 Jul 2020 09:02:47 -0700
phpmyadmin connects databases on multiple servers at the same time
1. Scenarios for use
In general, there are test environments and formal environments for our development.Of course, databases are also separate.If you could use phpmyadmin to directly access mysql on both servers.This is the need.
2. Solutions
1. Find under the phpmyadmin folderConfig.sample.inc.php, renamedConfig.inc.php.
2. OpenConfig. ...
Posted by jpaloyo on Wed, 15 Jul 2020 08:48:28 -0700
linux/window backup mysql database regularly
It is relatively simple for Linux to back up the database regularly. crontab can be used for scheduled backup. If windows is used, it may be troublesome.
1.Linux:
Step 1: configure the backup directory code on the server:
mkdir /var/lib/mysqlbackup
cd /var/lib/mysqlbackup
Step 2: write backup script code:
vi dbbackup.shPaste the f ...
Posted by jara06 on Tue, 14 Jul 2020 09:05:18 -0700