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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:20:57+00:00 2026-05-17T01:20:57+00:00

quick qestion today… what is more efficient and is there a big diffrence in

  • 0

quick qestion today… what is more efficient and is there a big diffrence in performance between those to SQL Server operations.

  1. select four objects from database in four separate select queries (just fetching them by id) in one single transaction, or

  2. select it in a single query (ofcourse more complicated, with joins).

I’ll tell you that I’d rather like the first solution, but I need to know if it is much less efficient (if it is less eficient at all).

Thanks for any opinion..

  • 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-17T01:20:58+00:00Added an answer on May 17, 2026 at 1:20 am

    Usually, multiple queries are less efficient, because there could be a network round trip and some other overhead for each. The most efficient you could do is retrieving exactly the data you need in the least number of queries needed.

    On the other hand, if you use batching, you could perform multiple queries in one database round trip, which may take approximately the same time as accessing the objects in a single query.

    if you only load a couple of objects, it doesn’t matter much. Maintainability of the business logic, which most probably depends on the solution you choose, is more important.

    The complexity of the joins and building objects could be done by an ORM. You don’t have to implements such things yourself. With NHibernate you get the possibility to retrieve objects using complex queries or single instances by id. And – it also supports batching by ADO.NET and some other important performance improvements.

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

Sidebar

Related Questions

Quick question, I was curious if there is any difference between a database table
Quick question (and my last today about SCSF) about what Services are intended to
Quick question, has anyone done a benchmark on random number generation between javascript and
Quick question, I was wondering if there is a way to use Solr's API
quick question. I am trying to get C++ nailed down, and today I spent
today I have a quick question. Here is my function: function checkheight() { var
I am writing an application that is primarily performance intensive. After writing a quick
Quick question: Is there a way to print raw input/output XML on a C#/.NET
Here's a quick question I've been banging my head against today. I'm trying to
Quick question. There is a legacy website (that is not under my control and

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.