I have 270 million entries in the table. I currently have a non-clustered index in a date column. 99% of the time I use strings with a date> 1/1/2008 .., i.e. 140 million of them. I am using SQL Server 2008. In this situation, it will be useful to use a filtered index that is different from a regular non-clustered index?
Also, if I use the "date" data type instead of the "datetime", how useful is it?
Thanks in advance!
Yes, filtered non-clustered index will be used for:
WHERE date ='20101016'
SELECT COUNT(date) FROM ... WHERE date BETWEEN '20080101' AND '20090101'
. , , .
, , , WHERE date > '200080101', ... . , date ( , , , ), "", 140M 270M .
WHERE date > '200080101'
date
- . MSDN, : . , .
, , . , "WHERE MyColumn IS NOT NULL", 140 , . , , .
(3- ) , datetime (8- ), . , (), datetime.
Source: https://habr.com/ru/post/1769835/More articles:JavaScript - onmouseover change previous css height element - javascriptDrawing in the context of a bitmap - cocoa-touchIn django-haystack, how can I use subclasses of models? - djangoMysql insert command with where clause - mysqlТаблицы Wiki для Multi-sort Media - sortingSaving Variables (Android) - variablesКакой хороший способ отобразить загружаемое изображение до тех пор, пока не будет завершен запрос ajax? - javascriptCan I use two separate SQLite databases? - databaseHalf UIButton does not respond to touch events - iosiOS - Manage two CoreData models with MagicalRecord - iosAll Articles