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 7402405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:44:00+00:00 2026-05-29T04:44:00+00:00

I have a Asp.net project with complex calculation in database. for example: i need

  • 0

I have a Asp.net project with complex calculation in database. for example: i need to Calculate staff salaries. this query action for Calculate staff salaries is very long and complex, because should calculated staff working hours Also, vacation and missions in per month. my question : do i use function sql server or entity framework query for this calculation? Which is better performance?

  • 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-29T04:44:01+00:00Added an answer on May 29, 2026 at 4:44 am

    Impossible to answer.

    In general:

    • SQL is great in calculating standard elements without business logic. Group by date, statistic distribution etc.

    • If you get into legal issues with a lot of decisions, it may be better for maintenance etc. to do things in the application. Also becqause SQL is harder to debug AND because these may change. If you grow you may have to have different logic for differen type of people – lot of decisions, easire to do when differen people groups run different scripsts coded in diferent classes.

    i need to Calculate staff salaries. this query action for Calculate staff salaries is very long
    and complex, because should calculated staff working hours Also, vacation and missions in per month

    I think this is better done with more logic inclined programming – i.e. outside of SQL. It is also not a LOT of data to process there unless you are a large company.

    Which is better performance?

    Who cares about that?

    SQL will be better, but the question is whether it matters. If it takes 5 minutes for you once per month and 1 minute in sql server then sql server is better but it is irrelevant. Perforamnce driven architectures are important – when it makes a difference. In this cae I doubt it does. You can likely calculate way more than 1 employee per second outside sql server per thread. Modern desktop higher end = 12 threads = 12 people per second = 720 people per minute. You can easily take a night (8 hours) once per month for the calculation. Do the math yourself. Performance is basically a non-issue here.

    Stuff like that is done batched anyway – you an do nightly batches or monthly batches and then you have all the time (run it first of the month, finished). This is premature optimization because it only is an issue with 10.000+ people on staff.
    I would go more towards mainteance long term while the legal and contractual side changes over time.

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

Sidebar

Related Questions

I have an ASP.NET project which is a front-end to a database. In addition
I have an ASP.NET MVC project with a form. In the Action method that
I have an ASP.NET MVC project and I have a single action that accepts
I have an existing complex website built using ASP.NET MVC, including a database backend,
I'm working on a large, complex ASP.NET project. I have a dynamically loaded web
I have a ASP.NET project and PostgreSQL database. In my database, I have table
I have ASP.NET project and attached mdf database.I want to deploy it to remote
I have ASP.Net MVC project. Plus wordpress blog under a subfolder /Blog. Now, when
I have an ASP.net project I'm looking at and they want to use MySQL.
I have a ASP.NET project, in which I have a method with 10 local

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.