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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:23:33+00:00 2026-06-12T10:23:33+00:00

I am planning a web service (.NET asmx) which I need to optimize as

  • 0

I am planning a web service (.NET asmx) which I need to optimize as much as possible.
The web service returns 10 random records (each call from a client needs to be random) from the database (Mysql) according to a parameter passed from the client. Each paramter (1-12) holds ~2000 records in the DB.

solutions:

  1. Querying the DB (which will be indexed by the parameter) and just return the result.
  2. Cache the table from the DB to a .net Datatable and select by Linq (~15,000 records).
  3. Cache the DB into 12 .net DataTables, each for possible param, and query the Datatable
    with Linq.

What is the best way to preform this task? I would love to hear other ideas!

Best Regards, Udi

  • 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-12T10:23:33+00:00Added an answer on June 12, 2026 at 10:23 am

    Cache the data into 12 strongly-typed arrays. That removes all processing besides selecting 10 random records from a simple array. It doesn’t get faster than that.

    Don’t use data tables. Why would you? They can only be slower than strongly typed lists/arrays of a custom class.

    How to optimize selecting 10 random items is a different question, though, that surely has been answered already.

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

Sidebar

Related Questions

Building a new ASP.net application, and planning to separate DB, 'service' tier and Web/UI
I'm in the process of planning a web service, which will be written in
I'm planning to develop a web service, i need to use in memory cache,
I'm planning an XML web service that takes an XML request and returns an
We are planning to build an Android app which interacts with a web service.
I'm planning on building an ASP.NET web site, which will be on a shared
I'm planning a web service and doing a little research about what are current
I'm planning a web service providing file download service for handheld devices. The requirement
I am planning to write web service in python. But, I found wsgi also
If one is planning to create a UI-less web service (receives JSON and/or XML,

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.