I've been seeing a very odd SQL Server 2014 behavior, and wondered if anyone has seen it. I have a query that has a left join with a large partitioned table. The partitioned table has 10s of millions of records, and each partition has about 100,000 records. Nothing much, really.The left join is part of an insert that gets a column from the partitioned table, if the column exists. The query contains the partition ID and all other joined columns are part of a non-clustered index.Through the profiler, I found that there were millions of reads and the execution plan was giving me a table scan on the partitioned table.I changed the query to do the insert followed by an update with inner join. That did the trick, but it worries me that SQL Server 2014 behaves differently from 2012 or 2008R2, which can make upgrading very time consuming. Has anyone seen this before?
↧