In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Today, someone in the group asked to create scenarios with high CPU occupancy for testing. As the saying goes, it is difficult to do good things, but it is not easy to do "bad" things. There are many ways to achieve this requirement, such as using some stress testing tools. The first thing that comes to mind is HASH JOIN. This connection consumes more CPU resources. Take two tables to HASH JOIN, preferably those with large fields, open a few more processes, and the CPU utilization rate will soar to 80-90%!
The following is to use a system view for HASH JOIN to achieve, simple and fast.
DECLARE @ I BIGINTWHILE (1x 1) BEGIN SELECT @ I = COUNT (*) FROM sys.all_objects AS a LEFT HASH JOIN sys.all_objects AS b ON b.name = a.nameEndtGo
Code-1: HASH JOIN
I only opened four session in SSMS and ran the above script's rendering at the same time. Please stop running the script manually after the test.
Figure-1: CPU usage shown by performance counters
Figure-2: CPU resource usage displayed by the Task Manager
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.