Category:DBT

  • MySQL optimization 3 (optimization rules)

    Time:2021-4-20

    When you look at the following content, make sure you can use explain to analyze SQL! Single index table optimization case: Question:For example, we want to query the first record sorted by user name with password = 666 and age > 30. After analysis, we will find that the SQL internal optimizer has carried out […]

  • Windows installation of mongodb

    Time:2021-4-20

    download Download address: https://www.mongodb.com/download-center/community/releases The latest version I see now is 4 . four . 2, so download: HTTPS :// fastdl . mongodb . org / windows / mongodb – windows – x86_ sixty-four – four . four . two . zip   After downloading, I move and unzip it by myself, and I put […]

  • The implementation of SQL statement divides priority according to grouping

    Time:2021-4-20

    The implementation of SQL statement divides priority according to grouping ——-Group priority SELECT B.* FROM (SELECT A.color, A.P, row_number() over(partition by P order by color desc) rn FROM (SELECT ‘red’ AS color, ‘3’ AS P FROM DUAL UNION SELECT ‘red’ AS color, ‘3’ AS P FROM DUAL UNION SELECT ‘black’ AS color, ‘3’ AS P […]

  • Notes for beginners of SQL

    Time:2021-4-20

    Common notes –Little support Inline Comments /**/Paragraph notes Basic grammar SELECT Retrieve data grammar effect example interpretation select Find the column and return the row select prod_name from products;#You can use to separate column names to find multiple columns. Find prod_ Name column, and return all the rows under it, in the products table. * […]

  • Adjusting the database structure of SQL Server 2000

    Time:2021-4-20

    The database structure in the development process will inevitably need to be modified repeatedly. The most troublesome situation is that the developer’s database structure has been modified, and there is a large amount of data in the database in practical application. How to update the data structure without affecting the data in the database? Of […]

  • Case analysis of establishing efficient index in MySQL

    Time:2021-4-20

    This paper introduces how to build an efficient index with MySQL. The details are as follows: How to build an ideal index? Query frequency discriminative power Index length Override field discriminative power Assuming 1 million users and 50 W for each gender, the discrimination is low. The length is small Index length directly affects the […]

  • Redis design and implementation 4: Dictionary Dict

    Time:2021-4-19

    In redis, the dictionary is the infrastructure. Redis database data, expiration time and hash type all take the dictionary as the underlying structure. Structure of dictionary Hashtable The implementation code of hash table is as follows:dict.h/dictht The dictionary of redis is implemented in the form of hash table. typedef struct dictht { //Hash table array, […]

  • Make a mind map of explain SQL analysis

    Time:2021-4-19

    This work adoptsCC agreementReprint must indicate the author and the link of this article Gao Yongli

  • Cast() function in SQL

    Time:2021-4-19

    The cast function is used to explicitly convert an expression of one data type to another. The argument to the cast() function is an expression that includes the source value and the target data type separated by the as keyword. 1、 Grammar:   CAST (expression AS data_type) Parameter Description:   expression: any valid SQL Server expression.   AS: […]

  • full join ,left join ,right join,inner join

    Time:2021-4-19

    full join ,left join ,right join,inner join 1、 Full join —– full join SELECT A.*, B.* FROM (SELECT 0 AS T1 FROM DUAL UNION SELECT 1 AS T1 FROM DUAL UNION SELECT 2 AS T1 FROM DUAL UNION SELECT 3 AS T1 FROM DUAL) A FULL JOIN (SELECT 4 AS T1 FROM DUAL UNION SELECT […]

  • MySQL merges and splits by specified characters

    Time:2021-4-19

    It is a common scene to merge or split according to the specified characters. MySQL is relatively simple in the way of merging, but splitting according to the specified characters is relatively troublesome (that is, it needs to write more characters). This article will illustrate how to merge and split according to the specified characters. […]

  • Analysis of a standard summary of SQL performance

    Time:2021-4-19

    This article will show you how to use explain to analyze a SQL. In fact, there are many articles on the Internet that introduce the use of explain in detail. This article combines examples and principles to let you have a better understanding as far as possible. Believe me, you should have a special harvest […]