Python batch deletes tens of millions of levels of mysql data

Scene description On-line mysql database contains a table with daily statistical results, more than 10 million items per day, which is unexpected to us. How many statistical results are there? Operations and maintenance found that the disk occupied 200 G, and finally asked the operation, you can only retain the last three days, the previous dat ...

Posted by jskywalker on Wed, 09 Oct 2019 12:22:22 -0700

pyodbc Connects MSSQL to Execute SQL Statements

Use django to connect to SQL Server, and pyodbc to connect to multiple databases. pyodbc, the SQL that runs the query, is very simple: import pyodbc connection = pyodbc.connect('DRIVER={SQL Server Native Client 10.0};SERVER=127.0.0.1;DATABASE=DB_name;UID=User_Name;PWD=PassWord') curs = connection.execute('select * from table') #curs.fetchone( ...

Posted by temidayo on Wed, 09 Oct 2019 08:05:18 -0700

Custom form export excel

Attention: 1. When the ID card number 18 bits is exported to excel, it is a scientific counting method, which can convert text format in Excel table to restore normal. Operating method https://jingyan.baidu.com/article/8ebacdf0d76c6349f65cd5ff.html 2. When using the regional linkage brought by Zh ...

Posted by schwa97 on Tue, 08 Oct 2019 18:49:57 -0700

day77 W3C simulation construction

Review """ 1,Advanced selector: 1) body div Progeny, control the latter, the former is decorated 2) body > div The latter is controlled by descendants, and the former is decorated. 3).d1 ~ .d2 Brothers, control the latter, the front is decorated 4).d1 + .d2 Neighbouring, controlling the latter, the front is decorated ...

Posted by naskar on Tue, 08 Oct 2019 12:12:52 -0700

MySQL Learning - Operating Custom Functions

ABSTRACT: This paper mainly studied the method of using DDL statements to operate custom functions. Understanding custom functions What is it? Custom functions are procedural database objects that are very similar to stored procedures. Like stored procedures, it is a code fragment consisting of SQL statements and procedural statements, and c ...

Posted by Ulysses Freeman on Tue, 08 Oct 2019 11:35:44 -0700

JAVA 8 New Feature Stream First Experience

What is Stream? Stream is an element queue from a data source and supports aggregation operations The <strong="> element queue is a specific type of object, forming a queue. Stream in Java does not store elements, but computes on demand. Sources of data sources and streams. They can be collections, arrays, I/O channel s, generat ...

Posted by ERuiz on Tue, 08 Oct 2019 10:46:55 -0700

python ldap3 for domain validation and synchronization

There are many intranet systems in the company. If each system has an independent login account, the company leader may have an opinion. In order to solve the problem of too many accounts, the login mode can adopt domain authentication. Here we share python's domain authentication and account synchro ...

Posted by monloi on Sun, 06 Oct 2019 21:40:47 -0700

jpa query partial field to get entity class

The code has been put into github, demo2 in test corresponds to sql mode, demo3 corresponds to hql mode, demo1 is paging query, another article will talk about {% post_link paging query paging query%}github address Preface When we usually use jpa query, there are two situations: one is to query all fi ...

Posted by shorty114 on Sun, 06 Oct 2019 21:25:48 -0700

Realization of Transaction Principles

Realization of Transaction Principles content affair Summary Principle Example Database transaction JDBC transaction content Transaction principle Implementing Database Transaction with SQL JDBC Implements Transaction Management affair Summary Transaction is a program unit that operate ...

Posted by chombone on Sun, 06 Oct 2019 18:01:57 -0700

Java Web (34): Customer Relationship Management System

Zero. Database tables and configuration files 0.1 Database t_customer table CREATE TABLE `t_customer` ( `cid` char(32) NOT NULL, `cname` varchar(40) NOT NULL, `gender` varchar(6) NOT NULL, `birthday` date DEFAULT NULL, `cellphone` varchar(15) NOT NULL, `email` varchar(40) DEFAULT NULL, ...

Posted by brauchi on Sun, 06 Oct 2019 10:27:05 -0700