Introduction to Rebirth
036 1 technology master
In fact, no matter how much money you make, going to work is painful.
Fortunately, Luo Ji is not the most basic employee, so there is not much tedious work.As an employee supported by the United States, I still have some small status in Google Korea.At least the local employees respect Luo Ji when they see him.
"It seems that no matter where you are, there are monks from outside who like to chant sutras!"
Luo Ji checked his email while drinking an iced Americano.Basically nothing happened, except for some advertisements, where his white boss Charles in the United States greeted him.
Charles has always regretted Luo Ji leaving the United States.So he sent another email later to tell Luo Ji that if he wanted to be transferred back at any time, he would find a way.And complained about the new employee's messy work and so on.
Well, in fact, Luo Ji sometimes found that even if he was reborn, besides being able to make money, he didn't seem to have any other regrets that needed to be made up for.
Everything goes well in school, I have good friends in life, and I have a boss who values me at work.It was already going smoothly, but now the simple mode is turned on.
Luo Ji didn't reply immediately because he didn't know what to say, so he had to sort out his thoughts.
Just when I was sorting my thoughts, there was a knock on the door.After Luo Ji said please come in, a Korean male employee walked in and said politely: "Hello, I have some questions about the SQL database. Do you have time?"
"Oh, okay." Luo Ji waved: "Come in and talk. By the way, what's your name?"
"My name is Li Zhenxian, just call me Zhenxian." The male employee, wearing black-rimmed glasses, asked, "It's like this. When I query large data sets and multi-table queries, the waiting time for some query operations is a bit too long. It’s been longer. Queries now take an average of 4 seconds to return results, sometimes even resulting in timeout errors.”
Luo Ji nodded: "Do you want to optimize?"
Li Zhenxian said: "Yes, I don't know how to optimize it now, and I don't know where to start."
Luo Ji suddenly smiled and asked, "You just joined Google, right?"
"Ah, right." Li Zhenxian suddenly stood up, looking a little reserved.
Luo Ji asked: "Did someone else ask you to ask?"
"Yes, uh, not entirely, I want to know too." Li Zhenxian explained.
Luo Ji understood in his heart that as an airborne faction, although Google employees respected them on the surface, they still had doubts about their own strength.Take this one as a threshold to verify your own strength.
Luo Ji didn't feel offended by this kind of thing.Because what he was doing in the United States was technology, and he is still responsible for it now. He understands how difficult it is to do this kind of thing if you have a colleague who doesn't understand anything.If you are a boss, it will be difficult to carry out a lot of work.
It’s a taboo in the technology industry for outsiders to guide experts.
So just face this kind of thing with a normal heart. As long as you show your strength, you will naturally be respected.
But when it comes to database SQL, this term feels like a long time ago to Luo Ji.
After all, more people know how to do things like databases, and the difficulty is relatively low.Basically, if you don't work in a commercial company, this knowledge may not be used.
If a person is not exposed to related technologies for a long time, it is easy to forget the relatively basic content.So can I still remember some algorithm frameworks now that I have been reborn?Therefore, I can’t just sit back and do nothing, I still have to improve myself.
What Luo Ji wants to do in the future is very cutting-edge, so he must at least write down the models that remember some details while he remembers them clearly. Otherwise, when he can make cyber elixirs, he will be missing something crucial. The two sides and hardware architecture are so cool.
"Luo Jixi?" Li Zhenxian asked.
"Oh, I'm sorry, I just got distracted." Luo Ji took over Li Zhenxian's computer, tapped on the keyboard, and said: "Your query here uses SELECT*, which selects all the columns, but your layer of nesting In fact, only the id is used in the query. You can query only the id to reduce the amount of data transmission. Try to avoid full table scans."
Li Zhenxian nodded: "Yes, I feel that there should be something wrong somewhere. The speed is never ideal."
Luo Ji said: "What index did you use before to speed up the query?"
Li Zhenxian said: "I created a Hash (hash) index, but it doesn't feel very fast. But this should be the fastest indexing method. I'm thinking there may be a problem somewhere else."
Luo Ji thought about it: "Although the bucket will not overflow, I feel... use B tree."
"B-tree?" Li Zhenxian was a little surprised: "But isn't it slower to use B-tree?"
Luo Ji smiled slightly: "In the data you need to index now, there are too many equal hash values. Sometimes when a Hash index encounters a large number of equal hash values, the performance is not necessarily higher than the B-tree index. You don't Did you find it? Nowadays, a large amount of record pointer information is stored in the same Hash value. In this way, it will be very troublesome to locate a certain record. Instead, it will waste multiple accesses to the table data, and finally the overall performance will be low. Therefore, It is no longer suitable to use a Hash table. At this time, using a B-tree may actually be faster."
"So that's it." Li Zhenxian suddenly realized, and looked at Luo Ji with more admiration.
Luo Ji sighed: "It would be better if we added Redis."
Li Zhenxian asked doubtfully: "What?"
"A NoSQL in-memory database." Luo Ji actually can't remember when Redis was launched, it may have been in the past two years.Looking at the confused expression on the other party's face, Luo Ji didn't care, because this was not a technical secret.
Even Luo Ji simply asked: "Don't you know? First of all, the data model of Redis is different from RDBMS. It adopts a more flexible data storage and query method, and only needs to describe operations for specific abstract data types. Secondly, , Redis stores data in memory instead of on disk, thus greatly shortening the access time of read and write operations, which is also the reason for its fast speed. Of course, when storing data, you need to use a method suitable for subsequent fast retrieval. Incredible, You don’t know?”
After being asked this question, Li Zhenxian began to doubt himself and said, "I think I've heard of it. But I haven't cared about SQL-related matters for a long time. Because this time the data center is coming to Seoul, I started to study it again."
At the right time, Luo Ji put on the ugly face of a technology expert and said: "Now the query time has been shortened to only 1.1 seconds, which is nearly 4 times faster than before. This is very good for the user experience. . But don’t be proud, go back and optimize it again. I think the indexing speed can be reduced to 0.1 to 0.3 seconds at the fastest.”
"Okay, okay." Li Zhenxian agreed and exited.
Luo Ji looked at the time. Ten minutes later, he pretended to go to the bathroom. Along the way, he saw that everyone's eyes had changed a bit.From being just polite before, now I have more trust from my own people.
Then there wasn’t much work throughout the afternoon.Wait until evening, then get off work.
Luo Ji still has to work part-time in a small classroom!
Fortunately, Luo Ji is not the most basic employee, so there is not much tedious work.As an employee supported by the United States, I still have some small status in Google Korea.At least the local employees respect Luo Ji when they see him.
"It seems that no matter where you are, there are monks from outside who like to chant sutras!"
Luo Ji checked his email while drinking an iced Americano.Basically nothing happened, except for some advertisements, where his white boss Charles in the United States greeted him.
Charles has always regretted Luo Ji leaving the United States.So he sent another email later to tell Luo Ji that if he wanted to be transferred back at any time, he would find a way.And complained about the new employee's messy work and so on.
Well, in fact, Luo Ji sometimes found that even if he was reborn, besides being able to make money, he didn't seem to have any other regrets that needed to be made up for.
Everything goes well in school, I have good friends in life, and I have a boss who values me at work.It was already going smoothly, but now the simple mode is turned on.
Luo Ji didn't reply immediately because he didn't know what to say, so he had to sort out his thoughts.
Just when I was sorting my thoughts, there was a knock on the door.After Luo Ji said please come in, a Korean male employee walked in and said politely: "Hello, I have some questions about the SQL database. Do you have time?"
"Oh, okay." Luo Ji waved: "Come in and talk. By the way, what's your name?"
"My name is Li Zhenxian, just call me Zhenxian." The male employee, wearing black-rimmed glasses, asked, "It's like this. When I query large data sets and multi-table queries, the waiting time for some query operations is a bit too long. It’s been longer. Queries now take an average of 4 seconds to return results, sometimes even resulting in timeout errors.”
Luo Ji nodded: "Do you want to optimize?"
Li Zhenxian said: "Yes, I don't know how to optimize it now, and I don't know where to start."
Luo Ji suddenly smiled and asked, "You just joined Google, right?"
"Ah, right." Li Zhenxian suddenly stood up, looking a little reserved.
Luo Ji asked: "Did someone else ask you to ask?"
"Yes, uh, not entirely, I want to know too." Li Zhenxian explained.
Luo Ji understood in his heart that as an airborne faction, although Google employees respected them on the surface, they still had doubts about their own strength.Take this one as a threshold to verify your own strength.
Luo Ji didn't feel offended by this kind of thing.Because what he was doing in the United States was technology, and he is still responsible for it now. He understands how difficult it is to do this kind of thing if you have a colleague who doesn't understand anything.If you are a boss, it will be difficult to carry out a lot of work.
It’s a taboo in the technology industry for outsiders to guide experts.
So just face this kind of thing with a normal heart. As long as you show your strength, you will naturally be respected.
But when it comes to database SQL, this term feels like a long time ago to Luo Ji.
After all, more people know how to do things like databases, and the difficulty is relatively low.Basically, if you don't work in a commercial company, this knowledge may not be used.
If a person is not exposed to related technologies for a long time, it is easy to forget the relatively basic content.So can I still remember some algorithm frameworks now that I have been reborn?Therefore, I can’t just sit back and do nothing, I still have to improve myself.
What Luo Ji wants to do in the future is very cutting-edge, so he must at least write down the models that remember some details while he remembers them clearly. Otherwise, when he can make cyber elixirs, he will be missing something crucial. The two sides and hardware architecture are so cool.
"Luo Jixi?" Li Zhenxian asked.
"Oh, I'm sorry, I just got distracted." Luo Ji took over Li Zhenxian's computer, tapped on the keyboard, and said: "Your query here uses SELECT*, which selects all the columns, but your layer of nesting In fact, only the id is used in the query. You can query only the id to reduce the amount of data transmission. Try to avoid full table scans."
Li Zhenxian nodded: "Yes, I feel that there should be something wrong somewhere. The speed is never ideal."
Luo Ji said: "What index did you use before to speed up the query?"
Li Zhenxian said: "I created a Hash (hash) index, but it doesn't feel very fast. But this should be the fastest indexing method. I'm thinking there may be a problem somewhere else."
Luo Ji thought about it: "Although the bucket will not overflow, I feel... use B tree."
"B-tree?" Li Zhenxian was a little surprised: "But isn't it slower to use B-tree?"
Luo Ji smiled slightly: "In the data you need to index now, there are too many equal hash values. Sometimes when a Hash index encounters a large number of equal hash values, the performance is not necessarily higher than the B-tree index. You don't Did you find it? Nowadays, a large amount of record pointer information is stored in the same Hash value. In this way, it will be very troublesome to locate a certain record. Instead, it will waste multiple accesses to the table data, and finally the overall performance will be low. Therefore, It is no longer suitable to use a Hash table. At this time, using a B-tree may actually be faster."
"So that's it." Li Zhenxian suddenly realized, and looked at Luo Ji with more admiration.
Luo Ji sighed: "It would be better if we added Redis."
Li Zhenxian asked doubtfully: "What?"
"A NoSQL in-memory database." Luo Ji actually can't remember when Redis was launched, it may have been in the past two years.Looking at the confused expression on the other party's face, Luo Ji didn't care, because this was not a technical secret.
Even Luo Ji simply asked: "Don't you know? First of all, the data model of Redis is different from RDBMS. It adopts a more flexible data storage and query method, and only needs to describe operations for specific abstract data types. Secondly, , Redis stores data in memory instead of on disk, thus greatly shortening the access time of read and write operations, which is also the reason for its fast speed. Of course, when storing data, you need to use a method suitable for subsequent fast retrieval. Incredible, You don’t know?”
After being asked this question, Li Zhenxian began to doubt himself and said, "I think I've heard of it. But I haven't cared about SQL-related matters for a long time. Because this time the data center is coming to Seoul, I started to study it again."
At the right time, Luo Ji put on the ugly face of a technology expert and said: "Now the query time has been shortened to only 1.1 seconds, which is nearly 4 times faster than before. This is very good for the user experience. . But don’t be proud, go back and optimize it again. I think the indexing speed can be reduced to 0.1 to 0.3 seconds at the fastest.”
"Okay, okay." Li Zhenxian agreed and exited.
Luo Ji looked at the time. Ten minutes later, he pretended to go to the bathroom. Along the way, he saw that everyone's eyes had changed a bit.From being just polite before, now I have more trust from my own people.
Then there wasn’t much work throughout the afternoon.Wait until evening, then get off work.
Luo Ji still has to work part-time in a small classroom!
You'll Also Like
-
Pirates: Being salvaged onto the ship by Roger at the beginning
Chapter 243 9 hours ago -
Robot Girl Era: My robot girls are all world-class
Chapter 151 9 hours ago -
If I ask you to take a photo of food, you turn it into a love documentary?
Chapter 149 9 hours ago -
Are you crazy? The emperor is being robbed of his bride?
Chapter 257 9 hours ago -
Naruto: Forged into God, White Fang is given as a gift at the beginning
Chapter 75 9 hours ago -
Taking stock of the ceiling of Zongman, who will beat Sukuna this time?
Chapter 141 9 hours ago -
I created a monster sequence!
Chapter 394 9 hours ago -
In the world of Meng Wang, I became the master of ice
Chapter 148 9 hours ago -
One Piece: The Max-Level Blacksmith of Marinford
Chapter 394 9 hours ago -
Pirates: The system ran away, leaving behind a slime
Chapter 149 9 hours ago