Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  Why (offset, limit) is slow in database select?

Starting from a problemFive years ago when I was working at Tencent, I found that MySQL request speed was very slow in the pagination scenario. With only 100,000 data, a select query on a single machine took about 2-3 seconds. I asked my mentor why, and he asked in return, "In an indexing scenario, what is the time complexity to get the nth largest number in MySQL?"The pursuit of the answerConfirming the scenarioAssuming there is an index on the "status" column, a query like "select * from table where status = xx limit 10 offset 10000" will be very slow. Even with a small amount of data, there...

3,002 0       MYSQL OFFSET LIMIT SLOW


  Nokia is still alive and lives a good life indeed

1Do you believe that Nokia, which you thought had gone bankrupt, not only survived but is still one of the world's most profitable technology companies, making trillions of dollars in profit every year?In 2022, Nokia's annual revenue reached 24.9 billion euros. Its net profit of 4.25 billion euros also hit a new high in nearly a decade. Moreover, as early as 2017, it quietly returned to the Fortune Global 500.In the telecommunications field, it is the world's third-largest telecommunications equipment manufacturer, second only to Huawei and Ericsson. In terms of 5G, its number of patents ranks...

2,277 0       NOKIA APPLE 5G


  Why MySQL 8 drops support of query cache

Many of you may have heard or used MySQL's query cache, because it used to be a popular way to improve MySQL's performance. As an important feature for improving MySQL's performance, the query cache was often recommended as a solution for slow queries. However, why has MySQL 8 abandoned the query cache? Today, we will analyze and explore this decision.What is query cache?According to official document:The query cache stores the text of a SELECT statement together with the corresponding result that was sent to the client. If an identical statement is received later, the server retriev...

2,158 1       MYSQL 8 QUERY CACHE


  Understanding JavaScript closure and where it can be used

ClosureThe official definition of closure is: an expression (usually a function) that has many variables and is bound to an environment that includes those variables.In JavaScript, closure refers to the ability of a function to access the lexical scope in which it was defined, even after the function has been executed and left that scope. This ability is due to the fact that when a function is created, it generates a closure that includes a reference to the definition environment of the current function, allowing the function to continue to access those variables within that environment.Below ...

1,195 0       CLOSURE JAVASCRIPT USAGE


  4 deployment modes of Redis

As a high-performance in-memory database, Redis is widely used in current mainstream distributed architecture systems. To improve system fault tolerance, using multiple instances of Redis is also inevitable, but the complexity is much higher than that of a single instance. This article mainly introduces the four deployment modes of Redis and their advantages and disadvantages.StandaloneStandalone mode is to install a Redis, start it, and business connects to it and that's all. The specific installation and startup steps are not repeated here. Standalone mode is also used in many scenarios, suc...

3,879 0       CLUSTER SENTINEL MASTER-SLAVE STANDALONE REDIS


  Why is single threaded Redis so fast

Redis is a high-performance, in-memory key-value database. According to official test reports, it can support around 100,000 QPS (queries per second) on a single machine. However, Redis uses a single-threaded architecture in its design.Why does Redis still have such high performance with a single-threaded design? Wouldn't it be better to use multiple threads for concurrent request processing?In this article, let's explore why Redis has a single-threaded architecture and still maintains its speed. The focus is on the following four aspects:Data storage in memoryEfficient data structuresSingle-t...

6,041 0       MULTI-THREADING SINGLE-THREADED REDIS


  Understanding PGO in GoLang 1.20

BackgroundThe Go 1.20 version was officially released in February 2023, it introduced the PGO(Profile Guided Optimization) mechanism.The basic principle of PGO can be divided into the following two steps:First, profiling is performed on the program to collect data about the program's runtime and generate a profiling file.When compiling the program, enable the PGO option, and the compiler will optimize the program's performance based on the content in the .pgo file.When compiling a program, the compiler will perform many optimizations, including well-known optimizations such as inline optimizat...

2,423 0       GOLANG PGO GO 1.20


  What is your opinion on WordPress hosting providers?

WordPress is a popular content management system (CMS) used by millions of websites around the world. According to data from W3Techs.com, at least 64.2% of websites that have CMS use WordPress’s system.However, to run a WordPress website, you need a hosting provider that can support it. There are many hosting providers that offer specialized WordPress hosting. For example, they would provide seamless, one-click WordPress migrations, or dedicate a team of experts to address any WordPress-related customer concerns.  The quality and reliability of WordPress hosting providers can v...

586 0       WORDPRESS HOSTING PROVIDER