prepare usage of MySQL

MySQL officially refers to prepare, execute and deallocate as PREPARE STATEMENT, which is used to be called preprocessing statement. The following is a detailed introduction. Sample code PREPARE stmt_name FROM preparable_stmt EXECUTE stmt_name [USING @var_name [, @var_name] ...] - {DEALLOCATE | DROP} PREPARE stmt_name   Here's a chestnut ...

Posted on Sun, 05 Apr 2020 01:42:57 -0700 by dsinghldh

Java8 handles Stream for the elegant posture of a collection

Preface In Java, collections and arrays are data structures that we often use and need to add, delete, change, check, aggregate, statistics, filter and so on.By contrast, this is true in relational databases, but collection and array processing was not very convenient until Java 8. However, this issue has been improved in Java 8, with the Jav ...

Posted on Sun, 05 Apr 2020 01:23:18 -0700 by mastermike707

A backup and restore of MySQL database in production environment

Background The company's production environment some application databases are deployed on the VMWare platform. In order to save costs, leaders are now considering migrating all data to the CAS platform living in KVM. The V2V migration was done before, but the efficiency is not high. It combines the time cost and other ...

Posted on Sat, 04 Apr 2020 16:31:01 -0700 by bob_marely

Clever use of aggregate $group in MongoDB

There is a set of data: { "campaign_id": "A", "campaign_name": "A", "subscriber_id": "123" }, { "campaign_id": "A", "campaign_name": "A", "subscriber_id": "123" }, { "campaign_id": "A", "campaign_name": "A", "subscriber_id": "456" } Group according to campaign ID and campaign name, a ...

Posted on Sat, 04 Apr 2020 10:14:04 -0700 by kaveman50

Discuss - Sqlite3 development optimization

1. Use transactions to process multiple database change statements or loop traversal statements in one transaction.      SqliteDB::startTransaction();          do_CRUD;          MayBe: SqliteDB::RollBack();      SqliteDB::Commit();   2. Use batch to perform operations with set type parameters    QVariantList    bindValue1;   QVariantLi ...

Posted on Sat, 04 Apr 2020 06:19:11 -0700 by pkedpker

When a new data is inserted into the local database (sql server), it is synchronized to the server database

One of my classmates asked me how to synchronize the local database to the server when inserting new data. At that time, I first thought about the program logic control and corresponding processing. But sometimes our program is not easy to deal with. Can we start from the database? Isn't there a trigger in the database? It should be OK. Let's d ...

Posted on Sat, 04 Apr 2020 04:39:41 -0700 by Katanius

Impact of using OpenSessionInViewFilter

Test controller method: @ResponseBody @RequestMapping(value = "/testFlush/json", produces = SystemHWUtil.RESPONSE_CONTENTTYPE_JSON_UTF) public String json2(Model model, HttpServletRequest request, HttpServletResponse response , int id) { // Session session=this.houseEvaluateDao.getSessionFactory().getCurrentSession( ...

Posted on Sat, 04 Apr 2020 03:32:01 -0700 by konigwolf

Java annotation (Java advanced)

Mind mapping 1. Notes overview What is Annotation: what is Annotation: Annotation annotation is a code level specification. It is a feature introduced by JDK 1.5 and later, which is at the same level as class, interface and enumeration Role of annotation: mainly used to replace XML and properties configuration files 2. Notes provided by ...

Posted on Sat, 04 Apr 2020 02:19:33 -0700 by moltenice

Setting the validity period of user password in Postgresql

Test environment: Server 192.168.137.222 highgodb v4.1.1 corresponds to PostgreSQL V9.5 Client 192.168.137.220 1) Create a test user at the highgo user of host 192.168.137.222 and set the password Expiration: [highgo@hgdb01 ~]$ psql psql (4.1.1) PSQL: Release 4.1.1 Connected to: HighGo Database V4.1 Enterprise Ed ...

Posted on Fri, 03 Apr 2020 17:55:50 -0700 by harrymanjan

windows installation Sphinx 3.0.1 (Chinese search)

The introduction of sphinx is not much, please check the document directly 1. Download the latest version of sphinx from the spinx official website. Address: http://www.sphinxsearch.com/ 2. Create a new data and log directory 3. Create a new sphinx.conf configuration file and put it in bin directory For inform ...

Posted on Fri, 03 Apr 2020 07:02:08 -0700 by tonymontana