Handwritten database connection pool with gp connection jar package address
Handwritten database connection and test
Recently, to connect to GP database (Greenplum SQL), you need to establish different number of connections
In fact, when you want to write database connection, you can write interface directly through springdata jpa, which is a kind of thinking
So in the use, I wrote a demo to t ...
Posted by bealers on Sun, 15 Dec 2019 10:22:26 -0800
Use of Oracle database merge into: update if it exists, insert if it does not exist
1. In the actual application scenario, we will use: if the data is in the table, update the data; if the data does not exist, insert the data. In oracle, you can use the merge into implementation, and in mysql, you can use the ON DUPLICATE KEY UPDATE. Here, only the merge into implementation method in oracle is introduced. The sql syntax is a ...
Posted by xsgatour on Sun, 15 Dec 2019 08:44:30 -0800
Connect database through JDBC and input data into database
First, we need to create an empty examstudent table in the database:
Second, create a student class corresponding to the contents in the table:
package com.atguigu.jdbc;
public class Student {
// Serial number
private int flowId;
// Examination type
private int type;
// ID number
private String idCard;
// Ticket num ...
Posted by flashman on Sun, 15 Dec 2019 08:10:17 -0800
sqlserver database bulk insert SqlBulkCopy
When you want to insert a large amount of data into the database, using insert is not only inefficient, but also causes a series of database performance problems
When inserting data using insert statements. I used two methods:
Each time you insert data, only one database will be inserted, which will lead to the continuous opening and closing ...
Posted by phpusr on Sat, 14 Dec 2019 06:32:34 -0800
The config module of beego source parsing
target
The config module refers to the implementation mode, interface and implementation separation in database/sql. In this tutorial, the implementation of ini format configuration is selected and the integration mode of beego and config module is analyzed to achieve the following three goals.
Understand the source code implementation of conf ...
Posted by rogair on Fri, 13 Dec 2019 04:10:29 -0800
Today, let's talk about how to build a watch efficiently
"High efficiency" means the speed of table building is fast? no, it's 9012 years. What do you want? Efficient table creation refers to how to quickly query this table. Under the same resource conditions, the query performance is better than that of ordinary tables!When we build a table, we usually attach attributes to the table, such ...
Posted by birdie on Fri, 13 Dec 2019 00:37:57 -0800
Two-way one-to-many Association in JPA
scene
Introduction to JPA and HelloWorld (with code download):
https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/103473937
Implement one-way many-to-one associations in JPA:
https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/103511623
One-way one-to-many associations are implemented in JPA:
https://blog.csdn.net/BADAO_LIUMANG_QIZ ...
Posted by baselineace on Thu, 12 Dec 2019 19:47:12 -0800
MySQL small practice 1: quickly insert 10 million pieces of data into MySQL database
Today, I saw a blog post on the Internet. The title is: insert 10 million pieces of data into mysql database in 4 minutes. I think it's very interesting, so I record it for myself to learn.MySQL version: mysql-5.7.22-winx64
1. Set the capacity of MySQL database tables
The default capacity of the database table is 4M. If the stored data exceeds ...
Posted by bbauder on Thu, 12 Dec 2019 08:35:08 -0800
MySQL - full, incremental backup and recovery (Theory + Practice)
The importance of data backup
1. In the production environment, the safety of data is very important, and any loss of data may have serious consequences
2. Causes of data loss
Program error
Human error
Computer failure
Disk failure
Disaster and theft
Classification of database backup
From a physical and logical point of view, backup can be d ...
Posted by cyberdesi on Thu, 12 Dec 2019 00:15:01 -0800
spark reads hive data java
Requirement: read out the data in hive and write it into es.
Environment: spark 2.0.2
1. enableHiveSupport() is set in sparksession
SparkConf conf = new SparkConf().setAppName("appName").setMaster("local[*]");
SparkSession spark = SparkSession
.builder()
.appName("Java Spark SQL basic exam ...
Posted by NSW42 on Tue, 10 Dec 2019 14:30:32 -0800