Loading...
|
|
|
|
|
|
Question of the Day |
Today's question (by Grant Fritchey): | |
SQL Server Columnstore Index Fragmentation | |
The columnstore index is absolutely different than the traditional rowstore b-tree index. Because of this, it doesn't suffer from the same kind of fragmentation across pages as the b-tree index. Yet, it does suffer from a type of fragmentation brought about by an excess of deleted rows in a rowgroup and a lack of compression of storage because more things are in the delta store. While b-tree indexes use dm_db_index_physical_stats to show fragmentation, which system tables or DMVs can be used in SQL Server (prior to SQL Server 2025) to determine columnstore fragmentation? | |
Think you know the answer? Click here, and find out if you are right. |
Yesterday's Question of the Day (by dbakevlar) |
Query Plan Regressions -- For the Question of the day, I am going to go deep, but try to be more clear, as I feel like I didn't give enough info last time, leading folks to guess the wrong answer... :) For today's question: You’re troubleshooting a performance issue on a critical stored procedure. You notice that a previously efficient query now performs a full table scan instead of an index seek. Upon investigating, you find that an NVARCHAR parameter is being compared to a VARCHAR column in the WHERE clause. What is the most likely cause of the query plan regression? Answer: Implicit conversion preventing index seek Explanation: Explanation:When an NVARCHAR parameter is compared to a VARCHAR column, SQL Server must perform an implicit conversion of the column to NVARCHAR to evaluate the predicate. This prevents the optimizer from using the index on the VARCHAR column efficiently, often resulting in a table scan. This is a classic performance pitfall, especially in parameterized stored procedures or queries where mismatched data types are used. While parameter sniffing (A) and statistics issues (C) can affect performance, in this case, the root cause is (B), which is known as the implicit conversion. You may have guessed (D) but it's misleading because SQL Server doesn’t “ignore” the index due to precedence, it simply misapplies it due to the need to cast. |
Database Pros Who Need Your Help |
Here's a few of the new posts today on the forums. To see more, visit the forums. |
SQL Server 2019 - Development |
do i lose "what this object depends on" etc when moving sprocs to etl server - Hi i was surprised to see the approach my coworkers used to sunset talend , a combo etl and job scheduling tool. They were in a hurry. Basically, the talend transforms /jobs they needed to do something with ran a proc on the "ERP Servers" and loaded the extracted data into various databases on our […] |
Editorials |
People Make Odd Choices - Comments posted to this topic are about the item People Make Odd Choices |
Navigating Multi Platform Realities in My Database Life - Comments posted to this topic are about the item Navigating Multi Platform Realities in My Database Life |
Formatting Dates and Times: The SQL Dialect Divide - Comments posted to this topic are about the item Formatting Dates and Times: The SQL Dialect Divide |
Article Discussions by Author |
How a Legacy Logic Choked SQL Server in a 30-Year-Old Factory - Comments posted to this topic are about the item How a Legacy Logic Choked SQL Server in a 30-Year-Old Factory, which is is not currently available on the site. |
SQL Server 2022 Clusterless Distributed Availability Group - Comments posted to this topic are about the item SQL Server 2022 Clusterless Distributed Availability Group |
Query Plan Regressions -- - Comments posted to this topic are about the item Query Plan Regressions -- |
Revolutionizing Efficiency: The Power of Custom Automation Software Development - Comments posted to this topic are about the item Revolutionizing Efficiency: The Power of Custom Automation Software Development |
SQL Server and AI: Integrating Machine Learning Services - Comments posted to this topic are about the item SQL Server and AI: Integrating Machine Learning Services |
Has the PK been used -- - Comments posted to this topic are about the item Has the PK been used --, which is is not currently available on the site. |
Has the PK been used -- - Comments posted to this topic are about the item Has the PK been used -- |
SQL Server 2022 - Administration |
Import/Export SSMS Settings issue - I have tried a number of times to export and then import my SSMS settings as I migrate local computers or sign into new servers. But for some reason, my toolbar customization and my keyboard settings (or other Tools -> Options) settings never pass through. I always seem to get errors like this: Your […] |
FQDN - SQL cannot connect when the server name has backslash - Hi I need to connect to a SQL server via FQDN - that is named 'ABC\ABC' If I try to connect to [ABC\ABC].mydomainfullyqualified.com it does not work. Tried many other combinations also. ABC.mydomainfullyqualified.com, all sorts of combinations. Nothing works.. If I change to a different server that does not have the back slash in the […] |
Upgrading from 2012 to 2022 - Hi, Would it be possible to upgrade from sql server 2012 sp4 to sql server 2022 in one upgrade step, or would it require intermediate upgrades? Thanks for any recommendations. |
SQL Server 2022 - Development |
Please help to optimize the query - Hi Experts, Thanks in advance. I am new to SQL. Can you please help me in optimizing the query? CREATE FUNCTION [dbo].[UDF_GET_REVIEWERS_INFO_FOR_COI](@awardId NUMERIC, @nomineeIds varchar(max),@phaseSettingId NUMERIC_ID) RETURNS TABLE AS RETURN SELECT ReviewerMasterCustomerId=Reviewer.MASTER_CUSTOMER_ID, ReviewerName=Reviewer.First_Name+' '+Reviewer.Last_Name, --START Nominator Centric COICount= CASE WHEN Prog.IS_NOMINATOR_CENTRIC =1 THEN (SELECT [dbo].UDF_GET_NOMINATOR_CENTRIC_COI_COUNT(@phaseSettingId,NomineeReviewer.REVIEWER_MAST_CUST_ID,1)) ELSE sum(CASE WHEN NomineeReviewer.COI_STATUS=1 THEN 1 ELSE 0 END) […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Loading...
Loading...