Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

SET ANSI_NULLS OFF DILEMA

$
0
0
I recently moved to a new shop where they acquired a legacy system (source code and all) and is maintaining it.The Database is a mess: lack of FKs, indexes and all Id are decimal(18,0) instead of (most properly) int,bigint, smallint, etc.But the worst is: [b]The database is globally set to ANSI_NULLS OFF[/b]. Of course I discovered it the bad way "how a wrong query is getting the right results?" style.I have a few question about how ANSI_NULLS affects indexes, SPs and VIEWS:1) Consider a big table with a column where 80% rows got it null. If I create a nonclustered unique/not unique index ill the nullable values be stored? How it can impact performance/index size?2) SPs, triggers and VIEWS must to be recreated/recompile with ANSI NULL ON? Ill it impact the queries inside?3) The DB is growing a lot and deadlocks are increasing exponential. Can we wait this issue to be alleviate (a bit)?Also...The system is big and there are lots of queries in both DB and App side and the thing is already running at thousands clients.Maybe I'm overlooking but I consider ANSI_NULLS OFF a serious modeling flaw and I'm wishing to get rid of it and I'm asking for and strategic advice in how to achieve it. We cannot afford to assembly a task force and storm it. So we need to address it in the long run.At first I'm inclined to check query-by-query, putting a SET ANSI_NULLS ON in the header for each one and testing in a feature-by-feature basis.Any advice?

Viewing all articles
Browse latest Browse all 3145

Trending Articles