Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Adding a Computed Column to a Table (2) - SQL School Video Expand / Collapse
Author
Message
Posted Tuesday, June 16, 2009 12:18 PM
SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: Moderators
Last Login: 2 days ago @ 9:01 AM
Points: 6,705, Visits: 1,680
Comments posted to this topic are about the item Adding a Computed Column to a Table (2) - SQL School Video

Andy
SQLAndy - My Blog!
Connect with me on LinkedIn
Follow me on Twitter
Post #735920
Posted Thursday, June 25, 2009 8:56 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, June 27, 2011 2:01 PM
Points: 7, Visits: 15
Hi Andy,

I'm curious to whether you'd recommend this approach for a particularly gnarly database I've inherited. It uses a concept of "partial text" for it's keys. For example, 2007-000123-001 might be the key in a table. The first 11 characters is, in essence, the primary key of the parent table in a parent-child hierarchy. The -001 makes it unique in the child table and also gives it a sequential order.

As you can imagine, it's painful because searches invariably rely upon substrings or LIKE clauses. I know that's killing the performance.

My thought was that I could use this computed column approach to slowly migrate us out of this hell, while still maintaining legacy support. I'd be curious to hear your thoughts.

Great work!

-Mike L
Post #741880
Posted Thursday, June 25, 2009 12:40 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, March 07, 2014 1:12 PM
Points: 2, Visits: 25
I was wondering what the performance advantages are between a derived field in a view and computed field in a table. Would you do one over the other because one performs better?
Post #742113
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse