Data connection pool - DBCP

I think DBCP is a little more complex than c3p0, but DBCP also has a certain share of use, so I recommend learning it To establish a DBCP connection pool: 1. Import jar package (DBCP needs more jars, four) Don't mention the jar package for operating the database, as mentioned in the last blog commons-dbcp2-2.5.0.jar and com ...

Posted by DonelleJenae on Sun, 12 Jan 2020 07:35:01 -0800

Spring Boot+mybatis create multi data source connection

Spring Boot+mybatis create multi data source connection 1, Background: the company system needs to do heterogeneous database data migration, need to configure multiple data sources, there are also some small problems in the configuration process, so make a record here; 2, Code address: 3, Code exp ...

Posted by rookie on Sat, 11 Jan 2020 08:10:12 -0800

Using POI to import and export Excel with large amount of data

Yesterday, the product put forward an urgent demand to export the commodity data shipped in November, write SQL and send it to DBA for execution, and then get more than 30 Excel files of 100W data. There is a property that exists in a field in the table in JSON format. You need to process the excel f ...

Posted by Prismatic on Sat, 11 Jan 2020 03:14:49 -0800

MySQL Data Backup and Recovery

Preface MySQL backup generally uses full library backup plus log backup. Depending on business needs, you can use full backup at 1 a.m. every Sunday and incremental backup every hour to recover the most complete data when MySQL fails. 1. Bilog Log Recovery MySQL's binary logs record all additions and deletions to the database (provided you hav ...

Posted by NickG21 on Fri, 10 Jan 2020 20:14:04 -0800

Group control of several common window functions in Hive

brief introduction Of course, there is nothing to say about regular window functions. It's very simple. Here's an introduction to grouping, focusing on the usage of rows between after grouping and sorting. The key is to understand the meaning of keywords in rows between: Keyword Meaning preceding Forward following In the future current ...

Posted by skyxmen on Thu, 09 Jan 2020 07:26:16 -0800

SQL Server batch modify database table PK name to PK table name

1. When we create the primary key of the data table of SQL server, sometimes a string of random strings will be added, as shown in the figure:   2. If you have obsessive-compulsive disorder, you can use the following sql script to modify the name of the primary key to the PK UU table name --Unify the primary key name of the table as PK_T ...

Posted by ollie007 on Wed, 08 Jan 2020 07:55:49 -0800

How to import CSV file data into PostgreSQL table?

How to write a stored procedure that imports data from a CSV file and populates tables? #1 building You can also use pgAdmin, which provides a GUI to import. Here it is. Show in SO thread . The advantage of using pgAdmin is that it is also applicable to remote databases. However, much like the previous solution, you will need to have ...

Posted by RoBoTTo on Wed, 08 Jan 2020 03:11:35 -0800

How to implement paging query in Akka Persistence

In Akka Persistence, the data is cached in the service memory (state), and the back-end stores some persistent event logs, so it is impossible to use DSL like SQL for paging query. Using Akka Streams and Actor, we can achieve the effect of paging query by coding, and the paging query is still step-by-step parallel EventSourcedBehavior CQRS mode ...

Posted by kamurj on Wed, 08 Jan 2020 01:01:33 -0800

On MySQL transaction and ACID

Recently, I have set up my personal blog. Here is the link: Babble of tobe The article will be updated in blogs and public numbers first. The so-called Transaction is to maintain the integrity of the database by ensuring that batch operations are either fully executed or not executed at all. Take A rotten Street example: A transfers 1000 yuan t ...

Posted by ddrudik on Tue, 07 Jan 2020 23:12:30 -0800

Summary of MySQL 8 Anti-Join

Guidance: Author: Zheng Songhua, Zhi Shu Tang's SQL Optimized Class Teacher, Net Name: Rabbit Riding Tortoise Today, I would like to share some articles about not in, not exists.In fact, this can be summarized as exists to in, which was treated differently in previous versions of mysql until version 8.0.16. Prior to version 16, in could be op ...

Posted by eyespark on Tue, 07 Jan 2020 18:55:46 -0800