Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8302385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:16:38+00:00 2026-06-08T17:16:38+00:00

Is it possible in Sql Server (2008, R2) to have a persisted column with

  • 0

Is it possible in Sql Server (2008, R2) to have a persisted column with a value resulting from a scalar function which queries other tables?
I’m running into performance problems since I have a field that should be evaluated considering values coming from other tables.
I logically solved the problem creating (indexed) views and evaluating the field using CASE WHEN, but now I’m running into performance issues with lot of data.

My idea is to evaluate the CASE WHEN in a function and use it as persisted column in the main table.
Is it possible? Will changes in the views trigger an update of the value?

Can you suggest me alternative solutions (other than triggers)?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T17:16:39+00:00Added an answer on June 8, 2026 at 5:16 pm

    Even if it is possible, it’s almost certainly a bad idea.

    Triggers are there for a reason, and this is an ideal example. Why do you not want to use them?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In SQL Server 2008, is it possible to create a column that can have
I have some server-based reports (*.rdl) which returns data from a SQL Server 2008
We are using SQL Server 2008. We have a table called response which has
I have inherited a SQL Server 2008 database to which calling applications have access
I am using SQL Server 2008. I have tables on which there are duplicate
I have Sql server 2008 R2 Express edition setup with me. IS it possible
Would it be possible in SQL Server 2008 to have a table created with
Given SQL Server 2008, I have written a simple find in string function as
Is it possible to query SQL Server 2008 R2 for a list of queries
Is it possible to replicate live DB from SQL Server 2008 R2 acting as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.