article thumbnail

Matching Supply With Demand — Solutions, Part 3

SQL Performance

1 D 5.000000 2 D 3.000000 3 D 8.000000 5 D 2.000000 6 D 8.000000 7 D 4.000000 8 D 2.000000 1000 S 8.000000 2000 S 6.000000 3000 S 2.000000 4000 S 2.000000 5000 S 4.000000 6000 S 3.000000 7000 S 2.000000. That’s a pretty efficient plan! The plan for this solution is shown in Figure 1. Figure 1: Query plan for Brian’s solution.

C++ 138
article thumbnail

Why MySQL Could Be Slow With Large Tables

Percona

In this blog post, we will review key topics to consider for managing large datasets more efficiently in MySQL. Redundant indexes: It is known that accessing rows by fetching an index is more efficient than through a table scan in most cases. 1 mysql mysql 592K Dec 30 02:48 tb1.ibd ibd -rw-r --. 1 mysql mysql 464K Dec 30 02:48 tb2.ibd

Insiders

Sign Up for our Newsletter

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Trending Sources

article thumbnail

When Do SQL Server Sorts Rewind?

SQL Performance

The Sort operator’s rewind behaviour may seem strange, but it has been this way from (at least) SQL Server 2000 to SQL Server 2019 inclusive (as well as Azure SQL Database). It is possible that replaying a Sort result would only be more cost-efficient than a Spool when the Sort contains at most one row.

Servers 106
article thumbnail

SQL Server I/O Basics Chapter #1

SQL Server According to Bob

Microsoft SQL Server I/O Basics Author: ​​ Bob Dorr, Microsoft SQL Server Escalation Published: ​​ December, 2004 SUMMARY: ​​ Learn the I/O requirements for Microsoft SQL Server database file operations. This will help you increase system performance and avoid I/O environment errors.

Servers 40
article thumbnail

Matching Supply With Demand — Solutions, Part 1

SQL Performance

Following is the desired result for the small set of sample data: DemandID SupplyID TradeQuantity -- -- -- 1 1000 5.000000 2 1000 3.000000 3 2000 6.000000 3 3000 2.000000 5 4000 2.000000 6 5000 4.000000 6 6000 3.000000 6 7000 1.000000 7 7000 1.000000. and the second (ID 2000) is for a quantity of 6.0. end: 14.0,

Code 116
article thumbnail

SQL Server I/O Basics Chapter #2

SQL Server According to Bob

Microsoft, ​​ Windows, ​​ Windows NT, ​​ and Windows Server ​​ are registered trademarks of Microsoft Corporation in the United States and/or other countries. The names of actual companies and products mentioned herein may be the trademarks of their respective owners.

Servers 40
article thumbnail

Azure Well-Architected Framework: What it is and how to tame it with AI and automation

Dynatrace

Performance efficiency. Performance Efficiency. With the Performance Efficiency pillar of the Azure Well-Architected Framework, organizations must ensure the workloads they modernize and migrate to the cloud are able to scale to meet changes in demand and usage over time. Operational excellence. Reliability.

Azure 186