Dynamically Truncate a Partitioned Table
Wouldn't be great if you could truncate any partition of a partitioned table with one T-SQL statement? This article shows you how.
2013-07-11
6,659 reads
Wouldn't be great if you could truncate any partition of a partitioned table with one T-SQL statement? This article shows you how.
2013-07-11
6,659 reads
In this article Greg Larsen will show you how to identify when your index statistics were updated last, what method was used to gather statistics, and how to update your statistics.
2013-07-11
3,074 reads
Many databases have large tables with hundreds of millions of rows. However, many of these tables are simply keeping a log or history data that can be archived and kept outside the user database in a special archive database.
2013-07-10
38,566 reads
In this article, you will learn what query optimisation statistics are and how SQL Server query optimizer uses statistics. You will also learn how to create and manage statistics, and what are the different ways to determine when statistics were last updated in SQL Server.
2013-07-10
4,410 reads
SQL Saturday is a training event for SQL Server professionals and those wanting to learn about SQL Server. This event will be held Jul 13 2013 at Grantham-Allee 20, Sankt Augustin, Cologne/Bonn, Rheinland, 53757 , Germany.
2013-07-09 (first published: 2013-07-05)
321 reads
Forwarded records in SQL Server can cause performance issues on heap tables because the record outgrows the page and the database engine uses pointers to reference the data. The best practice is to have a clustered index on every table, however, sometimes there are cases when a clustered index is not needed.
2013-07-09
3,188 reads
The continuing drop in the price of memory has made fast in-memory OLTP increasingly viable. SQL Server 2014 allows you to migrate the most-used tables in an existing database to memory-optimized 'Hekaton' technology, but how you balance between disk tables and in-memory tables for optimum performance requires judgement and experiment.
2013-07-08
3,567 reads
This metric returns the number of check constraints that have their is_not_trusted flag set to 1 in the sys.check_constraints table. Untrusted constraints force SQL Server to construct less efficient query plans, because it doesn’t know enough about the kind of data contained in the table. This can point to a data integrity issue which should be investigated.
2013-07-08
2,585 reads
2013-07-05 (first published: 2010-11-23)
20,809 reads
A comprehensive list of trace flags for SQL Server that you can use to configure your server instance.
2013-07-05 (first published: 2010-06-03)
30,163 reads
By James Serra
I’m honored to be hosting T-SQL Tuesday — edition #192. For those who may...
By Vinay Thakur
Continuing from Day 2 , we learned introduction on Generative AI and Agentic AI,...
Quite the title, so let me set the stage first. You have an Azure...
hi everyone I am not sure how to write the query that will produce...
Comments posted to this topic are about the item Rollback vs. Roll Forward
Comments posted to this topic are about the item Foreign Keys - Foes or...
I have some data in a table:
CREATE TABLE #test_data
(
id INT PRIMARY KEY,
name VARCHAR(100),
birth_date DATE
);
-- Step 2: Insert rows
INSERT INTO #test_data
VALUES
(1, 'Olivia', '2025-01-05'),
(2, 'Emma', '2025-03-02'),
(3, 'Liam', '2025-11-15'),
(4, 'Noah', '2025-12-22');
If I run this query, how many rows are returned?
SELECT *
FROM OPENJSON(
(
SELECT t.* FROM #test_data AS t FOR JSON PATH
)
) t; See possible answers