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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:26:28+00:00 2026-05-16T03:26:28+00:00

I am working on an auto trade website. On the page where Ad list

  • 0

I am working on an auto trade website. On the page where Ad list gets displayed, I plan to display the number of Ad for different categories: for example, for location: I will display something like “Vancouver (50), Richmond (12), Surrey (20)”. For vehicle make, the following will be shown “Honda (20), Ford(12), VW (24)”.

I am not sure if I should pull ALL the ad from the db into a List first, bind one page of the result to gridview control, and then compute stats for each category using Linq. if course I will limit the number of rows pulled from the db using some kind of condition – maybe set the MAX # of rows to be returned as 500.

My major concern is – is this going to be a memory hog?

  • 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-16T03:26:30+00:00Added an answer on May 16, 2026 at 3:26 am

    It is bad idea to count rows in the memory. Use

    SELECT COUNT() FROM... [ GROUP BY ]
    

    which is much more efficient.

    Also review possibility to cache these values. Assuming that multiple people loads your page simultaneously, but count of cars don’t changes quicker then once per 1 minute – apply caching strategy to obsolete values over 1 min.

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

Sidebar

Related Questions

I am working on a website that auto populates search result in a table
I am working on auto vectorization with GCC. I am not in a position
i was working ajax auto completeextender witha text box in asp.net and c#.net. i
When I press CTRL + Space the auto completing not working. It doesn't show
I'm adding an auto increment column (called rowNum) to my table and it's working
I have installed Eclipse Indigo and the auto-complete feature is working normally in the
how to change the working directory of fsi in VS. how to auto load
Working with an undisclosed API, I found a function that can set the number
I'm working on an auto-update script that should be able to restart the daemon
I have auto registration working with authlogic using gaizka's version of authlogic_openid which I

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.