Home Database Mysql Tutorial Brent Ozar谈如何提高SQL Server的生产力

Brent Ozar谈如何提高SQL Server的生产力

Jun 07, 2016 pm 05:43 PM
server how improve productive forces

SQL Server顾问Brent Ozar最近发表了一篇文章,谈到了每个SQL Server开发者在他们日常的编程任务中应该遵循的七种技术。按照Brent的说法,开发者应该尽量避免使用ORDER BY语句,他还建议开发者将所有查询结果放入应用程序内存中再进行排序。 如果数据库要执

SQL Server顾问Brent Ozar最近发表了一篇文章,谈到了每个SQL Server开发者在他们日常的编程任务中应该遵循的七种技术。按照Brent的说法,开发者应该尽量避免使用ORDER BY语句,他还建议开发者将所有查询结果放入应用程序内存中再进行排序。

如果数据库要执行数据处理、排序、加载及缓存等任务,理想情况下每项任务应该使用一个独立的数据库。Brent建议这些数据库使用简单恢复模式,而且每天进行一次备份。

他同时建议开发者应有效地利用动态管理视图(DMV), 还建议对于应用程序中的不同场景,如数据读写、5至15分钟前的老数据以及昨天之前的老数据,应该使用3种不同的连接字符串来建立连接。按照Brent的 说法,第一种连接字符串的使用场景不易伸缩,因为我们在SQL Server中并没有多少办法将负载横向扩展到处理写入的多台服务器上。

“对应用来说,美国服务器,已提交读快照隔离(Read-Committed Snapshot Isolation)是比With(Nolock)更好的选择,香港服务器,因为少了很多阻塞的麻烦,同时提供了一致的数据”,Brent说道。

按照Brent所说,你不应该再去参考老版本的书和在线文档,因为它们不会定期更新。“当看到某个听着不错的建议时,我喜欢采取‘质疑Phil博士’(译注:Dr.Phil是美国的一档电视秀,一些观众对主持人的生活观念持有不同意见)这样的策略”,Brent说道。

最后Brent还建议,如果想重用代码,那么最好用存储过程和视图代替函数。他认为函数对数据库层的性能有很大影响。

不过,有些开发者并不同意Brent的建议。

Tyler Burd说道:

我不同意无节制地采用第2条意见(即“避免ORDER BY,香港虚拟主机,而是在应用程序中排序”)。

Brent对Tyler的评论回应道:

为什么不把整个数据集加载到应用程序中并缓存下来呢?

还有个别开发者留言,反对Brent所说的避免函数而使用视图和存储过程的观点。

你是支持还是反对Brent的技巧和建议呢?请在此留言,InfoQ保证将其发给Brent进行处理和回复如何?

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to install, uninstall, and reset Windows server backup How to install, uninstall, and reset Windows server backup Mar 06, 2024 am 10:37 AM

WindowsServerBackup is a function that comes with the WindowsServer operating system, designed to help users protect important data and system configurations, and provide complete backup and recovery solutions for small, medium and enterprise-level enterprises. Only users running Server2022 and higher can use this feature. In this article, we will explain how to install, uninstall or reset WindowsServerBackup. How to Reset Windows Server Backup If you are experiencing problems with your server backup, the backup is taking too long, or you are unable to access stored files, then you may consider resetting your Windows Server backup settings. To reset Windows

Windows Server 2025 preview version welcomes update, Microsoft improves Insiders testing experience Windows Server 2025 preview version welcomes update, Microsoft improves Insiders testing experience Feb 19, 2024 pm 02:36 PM

On the occasion of releasing the build 26040 version of Windows Server, Microsoft announced the official name of the product: Windows Server 2025. Also launched is the Windows11WindowsInsiderCanaryChannel version build26040. Some friends may still remember that many years ago someone successfully converted Windows NT from workstation mode to server mode, showing the commonalities between various versions of Microsoft operating systems. Although there are clear differences between Microsoft's current version of the server operating system and Windows 11, those who pay attention to the details may be curious: why Windows Server updated the brand,

How to modify the Nginx version name to disguise any web server How to modify the Nginx version name to disguise any web server May 14, 2023 pm 09:19 PM

How to modify the default name of nginx, you can disguise it a little, or you can install Tip: Generally, modifications are made before nginx is compiled. After modification, the code needs to be recompiled as follows: scr/core/nginx.conf#definenginx_version"1.4.7"#definenginx_ver"nginx/"n

How to improve database query performance through PHP multi-threading How to improve database query performance through PHP multi-threading Jun 29, 2023 pm 08:27 PM

How to improve database query performance through PHP multi-threading Introduction: With the rapid development of the Internet, database query performance has become one of the important challenges faced by developers. As a widely used server-side scripting language, PHP also plays an important role in database queries. This article will explore how to improve database query performance through PHP multi-threading technology to meet the needs of high concurrent requests. 1. What is multi-threading? Before discussing how to use multi-threading to improve database query performance, we first need to understand what multi-threading is. popular

Microsoft releases Windows Server vNext preview version 25335 Microsoft releases Windows Server vNext preview version 25335 Jan 10, 2024 am 08:49 AM

While Microsoft released the Win11 preview update for the desktop, today it also released the Windows Server Long Term Service Channel (LTSC) preview Build 25335. As usual, Microsoft did not publish a complete change log, or even provide a corresponding blog post. Microsoft has adjusted the Windows Server preview version update log to make it the same as the Canary channel version. If no new content is introduced, the official blog post will not be posted. Note from IT Home: The server brand has not been updated and is still Windows Server 2022 in the preview version. In addition, Microsoft calls these versions Windows Server vNext instead of the Windows version that is already on the market.

Is there a future for employment in clinical pharmacy at Harbin Medical University? (What are the employment prospects for clinical pharmacy at Harbin Medical University?) Is there a future for employment in clinical pharmacy at Harbin Medical University? (What are the employment prospects for clinical pharmacy at Harbin Medical University?) Jan 02, 2024 pm 08:54 PM

What are the employment prospects of clinical pharmacy at Harbin Medical University? Although the national employment situation is not optimistic, pharmaceutical graduates still have good employment prospects. Overall, the supply of pharmaceutical graduates is less than the demand. Pharmaceutical companies and pharmaceutical factories are the main channels for absorbing such graduates. The demand for talents in the pharmaceutical industry is also growing steadily. According to reports, in recent years, the supply-demand ratio for graduate students in majors such as pharmaceutical preparations and natural medicinal chemistry has even reached 1:10. Employment direction of clinical pharmacy major: After graduation, students majoring in clinical medicine can engage in medical treatment, prevention, medical research, etc. in medical and health units, medical research and other departments. Employment positions: Medical representative, pharmaceutical sales representative, sales representative, sales manager, regional sales manager, investment manager, product manager, product specialist, nurse

Microsoft releases Windows Server 26080 preview update: Fixes Feedback Hub failure Microsoft releases Windows Server 26080 preview update: Fixes Feedback Hub failure Mar 14, 2024 pm 07:11 PM

IT House reported on March 14 that in addition to the Windows 11 Build 26080 preview update for the desktop, Microsoft also updated and launched the Windows Server Build 26080 preview update. As the latest preview version of the upcoming Windows Server Long Term Servicing Channel (LTSC), Windows Server Build 26080 provides Data Center Edition and Standard Edition, and users can choose desktop experience and Server Core installation options. This release also includes an annual channel for container hosts, and an Azure release specifically for virtual machine evaluation. IT House queries X social media. User feedback clicks the Copilot button in the lower right corner.

What is the matching logic of Server and Location in Nginx? What is the matching logic of Server and Location in Nginx? May 12, 2023 am 11:10 AM

Server matching logic When nginx determines which server block to execute a request, it mainly focuses on the listen and server_name fields in the server block. The listen command listen field defines the IP and port of the server response. If the listen field is not explicitly configured, the default listening 0.0.0.0:80 (root) or 0.0.0.0:8080 (non-root) listen can be configured as: a combination of ip and port, a single ip, listening on port 80 by default, a single port, and listening on all ip interfaces by default A unixsocket path where the last entry is usually only used in different

See all articles