THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | |

Search

You searched for the word(s): merge bug
< 1 second(s)
  • An Interesting MERGE Bug

    Summary: Investigating an optimiser transformation that exposes a bug in SQL Server’s MERGE implementation. I came across a Connect item today (by fellow SQL Server Central member ‘ALZDBA’) describing how using a combination of relatively new features can produce incorrect results or even an access violation inside SQL Server. Reproducing the ...
    Posted to Page Free Space (Weblog) by Paul White on August 3, 2010
  • MERGE Bug with Filtered Indexes

    A MERGE statement can fail, and incorrectly report a unique key violation when: The target table uses a unique filtered index; and No key column of the filtered index is updated; and A column from the filtering condition is updated; and Transient key violations are possible Example Tables Say we have ...
    Posted to Page Free Space (Weblog) by Paul White on December 9, 2012
  • Inside the Optimizer: Row Goals In Depth

    Background One of the core assumptions made by the SQL Server query optimiser’s model is that clients will consume all of the rows produced by a query.  This results in plans that favour the overall execution cost, though it may take longer to begin producing rows.  Let’s look at an example: The optimiser chooses to perform the ...
    Posted to Page Free Space (Weblog) by Paul White on August 18, 2010
  • SQL Server Optimizer Bug with JOIN and GROUP BY

    I came across a SQL Server bug recently that made me wonder how on earth I never noticed it before.  As the title of this post suggests, the bug occurs in common JOIN and GROUP BY queries, and while it does not cause incorrect results to be returned, it will often cause a poor query plan to be selected by the optimizer.  If you are just ...
    Posted to Page Free Space (Weblog) by Paul White on December 5, 2011
  • Incorrect Results with Indexed Views

    Summary: If you use MERGE, indexed views and foreign keys, your queries can return incorrect results. Microsoft have released a fix for incorrect results returned when querying an indexed view. The problem applies to: SQL Server 2012 SQL Server 2008 R2 SQL Server 2008 The Knowledge Base article does not go into much detail, or ...
    Posted to Page Free Space (Weblog) by Paul White on February 5, 2013
  • Incorrect Results Caused By Adding an Index

    It’s not often that a SQL Server bug really surprises me or makes me wonder how it was never spotted before, but this is one of those. To get right into it, say you have the following two tables: CREATE PARTITION FUNCTION PF (integer) AS RANGE RIGHT FOR VALUES (1000, 2000, 3000, 4000, 5000);   ...
    Posted to Page Free Space (Weblog) by Paul White on August 20, 2013
Privacy Statement