Tag:Main table

  • A slow query optimization of MySQL

    Time:2021-2-4

    Recently, I met a slow query problem in mysql, so I checked it. Here is a summary of the related process. Positioning reasons First of all, I checked the slow query log of MySQL and found that such a query takes a long time (about more than one second) and scans a large number of […]

  • Basic knowledge of MySQL

    Time:2021-1-17

    MySQL table query statement DQL: query statement Sort query Syntax: order by clause Sort by: ASC: ascending order, default Desc: descending order. be careful: If there are multiple sorting conditions, the second condition will be judged only when the condition values of the current edge are the same SELECT * from userinfo ORDER BY age […]

  • MySQL constraints

    Time:2021-1-16

    Concept: limit the data in the table to ensure the correctness, validity and integrity of the data. Classification: Primary key constraint: primary key Non NULL constraint: not null Unique constraint: unique Foreign key constraint: foreign key Non NULL constraint: not null, value cannot be null Add constraints when creating tables CREATE TABLE stu( id INT,Name […]

  • Net / NETCORE /. Net5 ORM six query systems – sqlsugar advanced

    Time:2021-1-10

    Framework introduction Sqlsugar ORM is an old domestic ORM framework with strong vitality. From the early immature stage of ORM, it has survived until now. Why should I insist on it all the time? That’s because there are still many users using it. I could have launched the new open source framework earlier However, users […]

  • Learning SQL Server (2): data table constraints

    Time:2020-12-23

    –Data table constraint: by making some rules, the data stored in the database is standardized, correct and complete. –Non NULL constraint the field cannot be empty keyword: not null –The value of the unique constraint field cannot be repeated in this table and can be null, but only once. Keyword unique –The default constraint gives […]

  • Records an event in which a range query hits an index but does not use an index

    Time:2020-12-20

    cause There are two general indexes create in the main order table of production environment_ Time and debts_ notify_ Num, when these two conditions are used for filtering, both indexes are hit, but only debts is used_ notify_ Num, resulting in more query columns and slower queries. It looks like “the index hits, but the […]

  • MySQL advanced 05 SQL statement

    Time:2020-12-19

    SQL Database structure operation SQL 1. View all databases show databases; 2. Switch to database Use database name; 3. Create database Create database database name; Create database database name charset ‘utf8’; 4. Delete database Drop database database name; Table structure operation SQL 1. View all tables in a database show tables; 2. View table structure […]

  • Database design of microservices

    Time:2020-12-6

    I don’t expect life to go smoothly all the time, but I hope that when it comes to life, I can be its opponent. ​​​​ Separate database The key of microservice design is database design. The basic principle is that each service has its own database, and only the microservice itself can access the database. […]

  • Record a real production environment accident, 200000 records were lost, and the MySQL delete command stepped on the pit, not intentionally deleting the database

    Time:2020-10-25

    –The main table before this launch, MD_ poc_ I didn’t put in other fields of survey, which has nothing to do with the bug I’m going to talk about this time. DROP TABLE IF EXISTS md_poc_survey; CREATE TABLE `md_poc_survey` ( `member_ survey_ id` int(10) NOT NULL AUTO_ Add comment ‘member questionnaire self increment ID’ PRIMARY […]

  • The function of (+) in SQL statement

    Time:2020-10-15

    Demo example Note: in the following example, table a is an employee table with four employees, namely, a, B, C and D, all of whom are male M. Table B is the salary table. There are four employees a, B and D. the corresponding salary is 1000, 2000, 4000. Then we demonstrate the (+) and […]

  • Repeater nested loop

    Time:2020-7-28

    Main table field name subset operation Main table field Sub table corresponding data 1 Sub table corresponding data 2 modify see No record ‘:’% > Front desk Code: //Main table data binding private void RptBind(string _strWhere, string _orderby) {this.rptList.DataSource =dt; this.rptList.DataBind(); } //Side table data binding protected void Getdata(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType […]

  • Oracle (PLSQL) Introduction 4

    Time:2020-5-28

    Previous chapter: introduction to Oracle III Learning video: https://www.bilibili.com/video/BV1tJ411r7EC?p=35 Oracle table connection: internal connection and external connection. The external connection is divided into left connection and right connection. In multi table query, if there is no conditional association between tables, all matching results will be found. For example, table a has 6 pieces of data, […]