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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:56:30+00:00 2026-06-14T19:56:30+00:00

I have a method that can pass in a where clause to a query.

  • 0

I have a method that can pass in a where clause to a query. This method then returns a DataSet.

What is faster and more efficient? To pass the where clause through so the SQL Server sends back less data (but has to do more work) or let the web server handle it through LINQ?

Edit:

This is assuming that the SQL Server is more powerful than the web server (as probably should be the case).

  • 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-14T19:56:31+00:00Added an answer on June 14, 2026 at 7:56 pm

    Are you using straight up ADO.Net to perform your data acccess? If so, then yes – use a WHERE clause in your SQL and limit the amount of data sent back to your application.

    SQL Server is effecient at this, you can design indexes to help it access data and you are transmitting less data back to your client application.

    Imagine you have 20,000 rows in a table, but you are only interested in 100 of them. Of course it is much more effecient to only grab the 100 rows from the source and send them back, rather than the whole lot which you then filter in your web application.

    You have tagged linq-to-sql, if that’s the case then using a WHERE clause in your LINQ statement will generate the WHERE clause on the SQL Server.

    But overall rule of thumb, just get the data you are interested in. It’s less data over the wire, the query will generally run faster (as long as it’s optimised via indexes etc) and your client application will have less work to do, it’s already got only the data it’s interested in.

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

Sidebar

Related Questions

I can't figure out why this is. I have a connect method that works
I saw DatabaseErrorHandler interface that have onCorruption method , this interface can be passed
I have a method that has a few pointers as parameters. This method can
Okay, so I want to have a generic method that can read data from
I have code in my Page_load method that can take up to a few
Let's say you have a business logic method that can perform some operation across
I have a method that will receive a string , but before I can
Let's say I have a subroutine/method that a user can call to test some
i have a javascript method that takes a date: convert(new Date(02/20/2010); how can i
I have a Rails controller action to test. In that action, a method User.can?

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.