Tag:optimization

  • Collection and summary of database optimization problems

    Time:2022-7-31

    peopleMenin useSQLHourOften fall into aerrorZone, i.e. tooshutNote on incomejunctionWhether the result is correct, ignoring differentrealizationMethod ofbetweenPossible performance differences,suchPerformance differences in large orcomplexData ofLibrary ringIn the environment (such asCoupletMachine affairsAffairs DivisionreasonOLTPOr decision support departmentSystemDSS)Middle tablepresentDeyoubybrightdisplay。 The author is workingrealIn practicefind, badSQLOften from inappropriate indexesDesignInadequateevenConnection conditions and impossibilityexcellentChemicalwhereClause. stayyesitMen JinLine appropriateexcellentAfter the transformation, its running speed has […]

  • Explain the matching of a large number of keywords in PHP optimization

    Time:2022-7-21

    catalogue Origin of the problem Original – grep Design code Evolution regularity Design Regular pit code Awakening – disyllabic Design code result Final level – trie tree Trie tree Design code result Other path multi process Design result summary Origin of the problem I encountered a problem in my work the other day: There are […]

  • SQL Server optimization 50 method summary

    Time:2022-7-14

    There are many reasons for the slow query speed, which are common as follows:1. There is no index or index is not used (this is the most common problem of slow query and a defect of program design)2. The i/o throughput is small, forming a bottleneck effect.3. The query is not optimized because the calculation […]

  • Linux system file system optimization and disk inspection

    Time:2022-7-10

    In Linux, data block is the basic data unit for storing data. In Linux, you canset upThe data block sizes in 3 are 1024 (1KB), 2048 (2KB) and 4096 (4KB) respectively. The size of data blocks determines the file disk occupancy. For example, if youset upThe size of the data block is 1024. No matter […]

  • HTML optimization speeds up Web pages

    Time:2022-7-7

    Obvious HTML, hidden “common script” The key to reducing the download time of web pages is to try to reduce the file size. When multiple pages share some component content, you can consider separating these common parts separately. For example, we can write script programs used by multiple HTML pages as independent JS file, and […]

  • Examples of optimizing Ruby code to improve program speed

    Time:2022-7-4

    This article mainly introduces how I put Ruby gem contracts Ruby speeds up 10 times. contracts. Ruby is used in my project to add code contracts to ruby. It looks like this: ? 1 2 3 4 Contract Num, Num => Num def add(a, b)  a + b end As long as the add method […]

  • JavaScript front end optimization code

    Time:2022-6-28

    catalogue Optimization of if judgment 1. The simplest method: if judgment 2. A better way: switch 3. Better method: strategy mode Optimization of includes For loop Array de duplication 1. The most traditional method: use the indexof subscript attribute of the array to query. 2. Optimization: use the set method of ES6. Arrow function Creation […]

  • How to optimize SQL statements

    Time:2022-6-21

    (1) Select the most efficient table name order (valid only in the rule-based optimizer):The Oracle parser processes the table names in the from clause from right to left. The last table written in the from clause (basic table driving table) will be processed first. If the from clause contains multiple tables, you must select the […]

  • PostgreSQL optimization operation on like%xxx%

    Time:2022-5-31

    The optimization of fuzzy matching (like) in any relational database is a painful thing. Relatively speaking, things like like like’abc%’are better. They can be optimized by creating indexes, but there is really no way for like’c%’. Here is a PostgreSQL optimization method for like’c%’based on the feature of full-text retrieval. Test data preparation (environment centos6.5 […]

  • MySQL uses overlay index to avoid returning to table and optimize query

    Time:2022-4-19

    preface Before we talk about overlay index, we need to understand its data structure: B + tree. First create a table demonstration (for simplicity, ID is created in order): id name 1 aa 3 kl 5 op 8  aa 10 kk 11 kl 14 jk 16 ml 17 mn 18 kl 19 kl 22 hj […]

  • Apache installation, configuration and optimization

    Time:2022-4-18

    installApache 2.0.48 (see the install manual) Considering the need to rewite in the future_ URL makes it easier for Google to include websites, and mod is specially added_ rewrite 。 At the same time, in order to limit the flow, mod is specially added_ limitpcnn. C patch, so there is an — enable forward option. […]

  • Ruby optimized inheritance class instance

    Time:2022-4-5

    In the principles of rails, there are statements to simplify the controller and enrich the model. A simple inheritance optimization is shown below with an example. Especially when there is a self variable to write changes in your method. Suppose we have the following model Copy codeThe code is as follows: class SubjectMatterExpert < User  […]