Performance Testing Script
Fourth in a series of scripts demonstrating a quantitative comparison between the text of two stored procedures
2013-10-31 (first published: 2009-02-17)
10,589 reads
Fourth in a series of scripts demonstrating a quantitative comparison between the text of two stored procedures
2013-10-31 (first published: 2009-02-17)
10,589 reads
This script pivots 1 to N numeric columns, grouping by 1 to N (N)(Var)char columns, pivoting by distinct date.
2013-10-30 (first published: 2013-10-15)
1,107 reads
This will sum all of the records of a specified database, excluding the 'sysdiagrams' table.
2013-10-23 (first published: 2007-12-17)
19,861 reads
2013-10-22 (first published: 2007-10-10)
30,322 reads
I have used the following function to convert dates according to desired textual formats that were not immediately available in the standard styles on offer.
2013-10-18 (first published: 2013-10-01)
2,023 reads
This script selects clustered indexes containing only a uniqueidentifier column
2013-10-17 (first published: 2013-10-02)
1,229 reads
This script finds the size of all indexes in a database along with the table and the filegroup on which the index resides.
2013-10-15 (first published: 2013-09-23)
1,881 reads
Top 5 expensive Queries from a Write IO perspective
2013-10-03 (first published: 2013-09-09)
2,374 reads
Lists details for all indexes on one or more tables / schemas, including row count and size. The non-pivot version also gives data type and other details for the columns.
2013-10-02 (first published: 2008-08-01)
3,718 reads
The below written query helps us find the most expensive queries from a read IO perspective. The DMV that we have used in this script is sys.dm_exec_query_stats and the function that we have used is sys.dm_exec_sql_text.
2013-09-27 (first published: 2013-09-09)
2,638 reads
By Brian Kelley
Fabiano Amorim has written an excellent article at Simple Talk on securing msdb. Here's...
By Steve Jones
This month we have a new host, which I am grateful for. So many...
I needed to do some research because there is more to #temp tables than...
Comments posted to this topic are about the item OUTER APPLY Fundamentals: Part 2
Comments posted to this topic are about the item Building Great Software
Comments posted to this topic are about the item The Range of Customers
I have this data in the OrderHeader table in a SQL Server 2025 database (ordered by CustomerID ASC):
orderid orderdate customerid complete 3 2025-05-10 00:00:00.0002 1 21 2024-01-10 00:00:00.0003 1 15 2023-10-28 00:00:00.0004 1 13 2025-03-08 00:00:00.0006 1 11 2024-04-02 00:00:00.0007 1If I run this query, how many rows are returned?
SELECT * from dbo.OrderHeader where customerid between 3 and '6'See possible answers