Last active
February 15, 2024 17:10
-
-
Save VladDBA/a09b4f58686e03642a8565a2614780a1 to your computer and use it in GitHub Desktop.
v_LongUsers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE StackOverflow | |
GO | |
CREATE VIEW v_LongUsers | |
WITH SCHEMABINDING | |
AS | |
SELECT [Id], | |
[AboutMe], | |
[Age], | |
[CreationDate], | |
[DisplayName], | |
[DownVotes], | |
[EmailHash], | |
[LastAccessDate], | |
[Location], | |
[Reputation], | |
[UpVotes], | |
[Views], | |
[WebsiteUrl], | |
[AccountId], | |
[CheckSum] | |
FROM [dbo].[Users] | |
WHERE LEN([DisplayName]) > 35; | |
GO | |
CREATE UNIQUE CLUSTERED INDEX CIX_VLongUsers | |
ON v_LongUsers([Id]) | |
WITH(ONLINE=OFF, MAXDOP=0); | |
GO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment