Timeline for Do triggers cause extra index updates?
Current License: CC BY-SA 4.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 7, 2020 at 19:28 | comment | added | NikitaSerbskiy | but it still may be used by the app for different purposes (f. e. to find "incorrect" records or records where date wasn't set by the user) | |
Dec 7, 2020 at 19:11 | comment | added | Joshua Grippo | @NikitaSerbskiy the app does not consider 1900-01-01 a valid value. Someone cannot enter this into the app. | |
Dec 7, 2020 at 18:48 | comment | added | NikitaSerbskiy | but what if somewhere in the app you already have query with WHERE condition which uses these values (SELECT TOP 1 Id FROM table WHERE CreateDate = '1900-01-01')? Adding this trigger you may broke the application. | |
Dec 7, 2020 at 14:52 | comment | added | Joshua Grippo | @NikitaSerbskiy Changing the filters is something we have thought through, but the queries that get generated specifically have [and is not null] so that the filtered indexes get used. If we look at a date, then default would be 1900-01-01 and the index filter would have to add a clause [and DateValue > '1900-01-01']. Since filtered indexes are already fickle beasts, I would like to keep them as short and sweet as possible. | |
Dec 7, 2020 at 14:45 | comment | added | Joshua Grippo | @SMor You are correct in that there would be no way to differentiate that at the database level. You are also correct in that the application is written to handle defaults if it sees them. It actually treats them as null if they were null. So the problem here is that they exist and take up space. | |
Dec 6, 2020 at 13:45 | comment | added | SMor | How do you propose to differentiate between a value that was supplied as a default vs. a value that was supplied by the application / user that just happens to be the same? Maybe the application is written to work correctly with these specific default values. | |
Dec 5, 2020 at 19:27 | comment | added | NikitaSerbskiy | Wouldn't be easier to change conditions in your filtered indexes? | |
Dec 5, 2020 at 19:08 | answer | added | J.D. | timeline score: 3 | |
Dec 5, 2020 at 18:50 | review | First posts | |||
Dec 5, 2020 at 19:59 | |||||
Dec 5, 2020 at 18:43 | history | asked | Joshua Grippo | CC BY-SA 4.0 |