Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Fat Index

Author  Topic 

X002548
Not Just a Number

15586 Posts

Posted - 2011-09-08 : 18:25:37
Me: You don't want a varchar(300) Index
Boss: Why
Me: It's Database 101
Boss: But why
Me: Because it will affect performance
Boss: How?


For the love of...

OK..If I get a document off the internet he might believe me. Does Kalen have anything?

Oh Paul....


Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-09-08 : 19:27:55
Well, it depends.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2011-09-09 : 04:51:34
If the column needs indexing (because if not important queries run slow), then the column needs an index. I've created indexes wider than that before.

Other thing that needs asking, it's a varchar(300), but how long are the strings stored in it?

--
Gail Shaw
SQL Server MVP
Go to Top of Page

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2011-09-09 : 07:55:17
A varchar(300) column would usually indicate a full-text index...but the functionality is of course different. Are you on 2008? In that case a filtered index might do it? Only index records that are less than x characters long...?

- Lumbago
My blog-> http://thefirstsql.com/2011/07/08/how-to-find-gaps-in-identity-columns-at-the-speed-of-light/
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2011-09-09 : 10:40:13
Guys..the problem is that some "business analysts" didn't dig deep enough or did true data modeling from a 3rd party vendor. This is waht they came up with.

To record the instant of a message going out to employees, the decided to make a "samrt" key. "<system>-<emplid>-<url>"

HELLO! And I was told I need to explain WHY this is not a good idea. they actually told the vendor to supply this..WITH the dashes...

Why can't I go and interview the Clients in the first place.

The realized after I balked, that the do have a unique key per message blast....not paid nearly enough

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2011-09-09 : 10:41:37
quote:
Originally posted by GilaMonster

If the column needs indexing (because if not important queries run slow), then the column needs an index. I've created indexes wider than that before.

Other thing that needs asking, it's a varchar(300), but how long are the strings stored in it?

--
Gail Shaw
SQL Server MVP



If you would...and example of that situation and why would be great


Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page
   

- Advertisement -