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

  • Home
  • SEARCH
  • 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 504025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:27:15+00:00 2026-05-13T06:27:15+00:00

I have an EMPLOYEE table in a SQL Server 2008 database which stores information

  • 0

I have an EMPLOYEE table in a SQL Server 2008 database which stores information for employees (~80,000+) many times for each year. For instance, there could by 10 different instances of each employees data for different years.

I’m reporting on this data via a web app, and wanted to report mostly with queries directly against the EMPLOYEE table, using functions to get information that needed to be computed or derived for reporting purposes.

These functions sometimes have to refer to an EMPLOYEE_DETAIL table which has 100,000+ rows for each year – so now that I’m starting to write some reporting-type queries, some take around 5-10 seconds to run, which is a bit too slow.

My question is, in a situation like this, should I try and tune functions and such so I
can always query the data directly for reporting (real-time)
, or is a better approach to summarize the data I need in a static table via a procedure or saved query, and use that for any reporting?

I guess any changes in reporting needs could be reflected in the “summarizing mechanism” I use…but I’m torn on what to do here…

  • 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-05-13T06:27:15+00:00Added an answer on May 13, 2026 at 6:27 am

    Before refactoring your functions I would suggest you take a look at your indexes. You would be amazed at how much of a difference well constructed indexes can make. Also, index maintenance will probably require less effort than a “summarizing mechanism”

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

Sidebar

Related Questions

This is with Microsoft SQL Server 2008. I've got 2 tables, Employee and EmployeeResult
I have 2 tables: 1. Employees 2. Vouchers Employees table has a single primary
I need to create trigger in SQL Server 2008 that gone insert all values
Suppose I have a dataset with those two immortal tables: Employee & Order Emp
I have these tables: Projects(projectID, CreatedByID) Employees(empID,depID) Departments(depID,OfficeID) Offices(officeID) CreatedByID is a foreign key
I have the following requirement I have a Employee class: public class Employee {
If I have a query like: Select EmployeeId From Employee Where EmployeeTypeId IN (1,2,3)
Some existing web services I consume have methods that look something like this: List<Employee>
Does Google force employees who have offers from Facebook to leave immediately?
I'm trying to write a stored procedure to select employees who have birthdays that

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.